本文整理了Java中org.openscience.cdk.interfaces.IRing.contains()
方法的一些代码示例,展示了IRing.contains()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IRing.contains()
方法的具体详情如下:
包路径:org.openscience.cdk.interfaces.IRing
类名称:IRing
方法名:contains
暂无
代码示例来源:origin: cdk/cdk
Important: This method only returns meaningful results if /**
* Checks if atom1
and atom2
share membership in the same ring or ring system.
* Membership in the same ring is checked if the RingSet contains the SSSR of a molecule; membership in
* the same ring or same ring system is checked if the RingSet contains all rings of a molecule.
*
* atom1
and
* atom2
are members of the same molecule for which the RingSet was calculated!
*
* @param ringSet The collection of rings
* @param atom1 The first atom
* @param atom2 The second atom
* @return boolean true if atom1
and atom2
share membership of at least one ring or ring system, false otherwise
*/
public static boolean isSameRing(IRingSet ringSet, IAtom atom1, IAtom atom2) {
for (IAtomContainer atomContainer : ringSet.atomContainers()) {
IRing ring = (IRing) atomContainer;
if (ring.contains(atom1) && ring.contains(atom2)) return true;
}
return false;
}
代码示例来源:origin: cdk/cdk
public static boolean inSameAromaticRing(IAtomContainer m, IAtom atom1, IAtom atom2, IRingSet rs) {
if (rs == null) return false;
for (int i = 0; i <= rs.getAtomContainerCount() - 1; i++) {
IRing r = (IRing) rs.getAtomContainer(i);
if (r.contains(atom1) && r.contains(atom2)) {
if (isAromaticRing(r)) return (true);
}
}
return false;
}
代码示例来源:origin: org.openscience.cdk/cdk-legacy
private boolean inRingSet(IAtom atom, IRingSet ringSet) {
for (int i = 0; i
if (ring.contains(atom)) return true;
}
return false;
}
代码示例来源:origin: cdk/cdk
/**
* Partition the bonding partners of a given atom into ring atoms and non-ring atoms
*
* @param atom The atom whose bonding partners are to be partitioned
* @param ring The ring against which the bonding partners are checked
* @param ringAtoms An AtomContainer to store the ring bonding partners
* @param nonRingAtoms An AtomContainer to store the non-ring bonding partners
*/
public void partitionNonRingPartners(IAtom atom, IRing ring, IAtomContainer ringAtoms, IAtomContainer nonRingAtoms) {
List atoms = molecule.getConnectedAtomsList(atom);
for (int i = 0; i
if (!ring.contains(curAtom)) {
nonRingAtoms.addAtom(curAtom);
} else {
ringAtoms.addAtom(curAtom);
}
}
}
代码示例来源:origin: org.openscience.cdk/cdk-sdg
/**
* Partition the bonding partners of a given atom into ring atoms and non-ring atoms
*
* @param atom The atom whose bonding partners are to be partitioned
* @param ring The ring against which the bonding partners are checked
* @param ringAtoms An AtomContainer to store the ring bonding partners
* @param nonRingAtoms An AtomContainer to store the non-ring bonding partners
*/
public void partitionNonRingPartners(IAtom atom, IRing ring, IAtomContainer ringAtoms, IAtomContainer nonRingAtoms) {
List atoms = molecule.getConnectedAtomsList(atom);
for (int i = 0; i
if (!ring.contains(curAtom)) {
nonRingAtoms.addAtom(curAtom);
} else {
ringAtoms.addAtom(curAtom);
}
}
}
代码示例来源:origin: org.openscience.cdk/cdk-silent
/**
* Returns a vector of all rings that this atom is part of.
*
* @param atom The atom to be checked
* @return A vector of all rings that this bond is part of
*/
@Override
public IRingSet getRings(IAtom atom) {
IRingSet rings = new RingSet();
IRing ring;
for (int i = 0; i
if (ring.contains(atom)) {
rings.addAtomContainer(ring);
}
}
return rings;
}
代码示例来源:origin: cdk/cdk
/**
* Returns a vector of all rings that this atom is part of.
*
* @param atom The atom to be checked
* @return A vector of all rings that this bond is part of
*/
@Override
public IRingSet getRings(IAtom atom) {
IRingSet rings = new RingSet();
IRing ring;
for (int i = 0; i
if (ring.contains(atom)) {
rings.addAtomContainer(ring);
}
}
return rings;
}
代码示例来源:origin: org.openscience.cdk/cdk-data
/**
* Returns a vector of all rings that this atom is part of.
*
* @param atom The atom to be checked
* @return A vector of all rings that this bond is part of
*/
@Override
public IRingSet getRings(IAtom atom) {
IRingSet rings = new RingSet();
IRing ring;
for (int i = 0; i
if (ring.contains(atom)) {
rings.addAtomContainer(ring);
}
}
return rings;
}
代码示例来源:origin: cdk/cdk
/**
* Returns a vector of all rings that this atom is part of.
*
* @param atom The atom to be checked
* @return A vector of all rings that this bond is part of
*/
@Override
public IRingSet getRings(IAtom atom) {
IRingSet rings = new RingSet();
IRing ring;
for (int i = 0; i
if (ring.contains(atom)) {
rings.addAtomContainer(ring);
}
}
return rings;
}
代码示例来源:origin: org.openscience.cdk/cdk-legacy
/**
* Recovers a RingSet corresponding to a AtomContainer that has been
* stored by storeRingSystem().
*
* @param mol The IAtomContainer for which to recover the IRingSet.
*/
private IRingSet recoverRingSystem(IAtomContainer mol) {
IRingSet ringSet = mol.getBuilder().newInstance(IRingSet.class);
for (Integer[] bondNumbers : listOfRings) {
IRing ring = mol.getBuilder().newInstance(IRing.class, bondNumbers.length);
for (int bondNumber : bondNumbers) {
IBond bOnd= mol.getBond(bondNumber);
ring.addBond(bond);
if (!ring.contains(bond.getBegin())) ring.addAtom(bond.getBegin());
if (!ring.contains(bond.getEnd())) ring.addAtom(bond.getEnd());
}
ringSet.addAtomContainer(ring);
}
return ringSet;
}
代码示例来源:origin: cdk/cdk
/**
* Returns all the rings in the RingSet that share
* one or more atoms with a given ring.
*
* @param ring A ring with which all return rings must share one or more atoms
* @return All the rings that share one or more atoms with a given ring.
*/
@Override
public IRingSet getConnectedRings(IRing ring) {
IRingSet cOnnectedRings= ring.getBuilder().newInstance(IRingSet.class);
IRing tempRing;
IAtom atom;
for (int i = 0; i
for (int j = 0; j
if (tempRing != ring && !connectedRings.contains(tempRing) && tempRing.contains(atom)) {
connectedRings.addAtomContainer(tempRing);
}
}
}
return connectedRings;
}
代码示例来源:origin: cdk/cdk
/**
* Returns all the rings in the RingSet that share
* one or more atoms with a given ring.
*
* @param ring A ring with which all return rings must share one or more atoms
* @return All the rings that share one or more atoms with a given ring.
*/
@Override
public IRingSet getConnectedRings(IRing ring) {
IRingSet cOnnectedRings= ring.getBuilder().newInstance(IRingSet.class);
IRing tempRing;
IAtom atom;
for (int i = 0; i
for (int j = 0; j
if (tempRing != ring && !connectedRings.contains(tempRing) && tempRing.contains(atom)) {
connectedRings.addAtomContainer(tempRing);
}
}
}
return connectedRings;
}
代码示例来源:origin: org.openscience.cdk/cdk-data
/**
* Returns all the rings in the RingSet that share
* one or more atoms with a given ring.
*
* @param ring A ring with which all return rings must share one or more atoms
* @return All the rings that share one or more atoms with a given ring.
*/
@Override
public IRingSet getConnectedRings(IRing ring) {
IRingSet cOnnectedRings= ring.getBuilder().newInstance(IRingSet.class);
IRing tempRing;
IAtom atom;
for (int i = 0; i
for (int j = 0; j
if (tempRing != ring && !connectedRings.contains(tempRing) && tempRing.contains(atom)) {
connectedRings.addAtomContainer(tempRing);
}
}
}
return connectedRings;
}
代码示例来源:origin: org.openscience.cdk/cdk-silent
/**
* Returns all the rings in the RingSet that share
* one or more atoms with a given ring.
*
* @param ring A ring with which all return rings must share one or more atoms
* @return All the rings that share one or more atoms with a given ring.
*/
@Override
public IRingSet getConnectedRings(IRing ring) {
IRingSet cOnnectedRings= ring.getBuilder().newInstance(IRingSet.class);
IRing tempRing;
IAtom atom;
for (int i = 0; i
for (int j = 0; j
if (tempRing != ring && !connectedRings.contains(tempRing) && tempRing.contains(atom)) {
connectedRings.addAtomContainer(tempRing);
}
}
}
return connectedRings;
}
代码示例来源:origin: org.openscience.cdk/cdk-legacy
boolean haveatom = r.contains(m.getAtom(i));
代码示例来源:origin: uk.ac.ebi.smsd/smsd-core
boolean haveatom = ring.contains(mol.getAtom(i));
代码示例来源:origin: org.openscience.cdk/cdk-legacy
boolean haveatom = ring.contains(mol.getAtom(i));
代码示例来源:origin: org.openscience.cdk/cdk-legacy
boolean haveatom = ring.contains(mol.getAtom(i));
代码示例来源:origin: org.openscience.cdk/cdk-legacy
continue jloop;
boolean haveatom = ring.contains(mol.getAtom(i));
代码示例来源:origin: asad/ReactionDecoder
boolean haveatom = ring.contains(mol.getAtom(i));