public class QueryAtomContainer extends QueryChemObject implements IQueryAtomContainer
Modifier and Type | Field and Description |
---|---|
protected int |
atomCount
Number of atoms contained by this object.
|
protected IAtom[] |
atoms
Internal array of atoms.
|
protected int |
bondCount
Number of bonds contained by this object.
|
protected IBond[] |
bonds
Internal array of bonds.
|
protected int |
growArraySize
Amount by which the bond and atom arrays grow when elements are added and
the arrays are not large enough for that.
|
protected int |
lonePairCount
Number of lone pairs contained by this object.
|
protected ILonePair[] |
lonePairs
Internal array of lone pairs.
|
protected int |
singleElectronCount
Number of single electrons contained by this object.
|
protected ISingleElectron[] |
singleElectrons
Internal array of single electrons.
|
protected List<IStereoElement> |
stereoElements
Internal list of atom parities.
|
Constructor and Description |
---|
QueryAtomContainer(IAtomContainer container,
IChemObjectBuilder builder)
Constructs an AtomContainer with a copy of the atoms and electronContainers
of another AtomContainer (A shallow copy, i.e., with the same objects as in
the original AtomContainer).
|
QueryAtomContainer(IChemObjectBuilder builder)
Constructs an empty AtomContainer.
|
QueryAtomContainer(int atomCount,
int bondCount,
int lpCount,
int seCount,
IChemObjectBuilder builder)
Constructs an empty AtomContainer that will contain a certain number of
atoms and electronContainers.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IAtomContainer atomContainer)
Adds all atoms and electronContainers of a given atomcontainer to this
container.
|
void |
addAtom(IAtom atom)
Adds an atom to this container.
|
void |
addBond(IBond bond)
Adds a Bond to this AtomContainer.
|
void |
addBond(int atom1,
int atom2,
IBond.Order order)
Adds a bond to this container.
|
void |
addBond(int atom1,
int atom2,
IBond.Order order,
IBond.Stereo stereo)
Adds a bond to this container.
|
void |
addElectronContainer(IElectronContainer electronContainer)
Adds a ElectronContainer to this AtomContainer.
|
void |
addLonePair(ILonePair lonePair)
Adds a lone pair to this AtomContainer.
|
void |
addLonePair(int atomID)
Adds a LonePair to this Atom.
|
void |
addSingleElectron(int atomID)
Adds a LonePair to this Atom.
|
void |
addSingleElectron(ISingleElectron singleElectron)
Adds a single electron to this AtomContainer.
|
void |
addStereoElement(IStereoElement element)
Adds a stereo element to this container.
|
Iterable<IAtom> |
atoms()
Returns an Iterable for looping over all atoms in this container.
|
Iterable<IBond> |
bonds()
Returns an Iterable for looping over all bonds in this container.
|
IQueryAtomContainer |
clone()
Clones this AtomContainer object and its content.
|
boolean |
contains(IAtom atom)
True, if the AtomContainer contains the given atom object.
|
boolean |
contains(IBond bond)
True, if the AtomContainer contains the given bond object.
|
boolean |
contains(IElectronContainer electronContainer)
True, if the AtomContainer contains the given ElectronContainer object.
|
boolean |
contains(ILonePair lonePair)
True, if the AtomContainer contains the given LonePair object.
|
boolean |
contains(ISingleElectron singleElectron)
True, if the AtomContainer contains the given SingleElectron object.
|
static QueryAtomContainer |
create(IAtomContainer mol,
Expr.Type... opts)
Create a query from a molecule and a provided set of expressions.
|
Iterable<IElectronContainer> |
electronContainers()
Returns an Iterable for looping over all electron containers in this container.
|
IAtom |
getAtom(int idx)
Get the atom at the specified idx, the index should be in the
range 0 ≤ idx <
IAtomContainer.getAtomCount() . |
int |
getAtomCount()
Returns the number of Atoms in this Container.
|
int |
getAtomNumber(IAtom atom)
Returns the position of a given atom in the atoms array.
|
IBond |
getBond(IAtom atom1,
IAtom atom2)
Returns the bond that connects the two given atoms.
|
IBond |
getBond(int idx)
Get the bond at the specified idx, the index should be in the
range 0 ≤ idx <
IAtomContainer.getBondCount() . |
int |
getBondCount()
Returns the number of Bonds in this Container.
|
int |
getBondNumber(IAtom atom1,
IAtom atom2)
Returns the position of the bond between two given atoms in the
electronContainers array.
|
int |
getBondNumber(IBond bond)
Returns the position of a given bond in the electronContainers array.
|
double |
getBondOrderSum(IAtom atom)
Deprecated.
Replaced by
AtomContainerManipulator#getBondOrderSum(IAtomContainer, IAtom) |
int |
getConnectedAtomsCount(IAtom atom)
Returns the number of atoms connected to the given atom.
|
List<IAtom> |
getConnectedAtomsList(IAtom atom)
Returns an ArrayList of all atoms connected to the given atom.
|
int |
getConnectedBondsCount(IAtom atom)
Returns the number of Bonds for a given Atom.
|
int |
getConnectedBondsCount(int idx)
Returns the number of connected atoms (degree) to the given atom.
|
List<IBond> |
getConnectedBondsList(IAtom atom)
Returns an ArrayList of all Bonds connected to the given atom.
|
List<IElectronContainer> |
getConnectedElectronContainersList(IAtom atom)
Returns an ArrayList of all electronContainers connected to the given atom.
|
int |
getConnectedLonePairsCount(IAtom atom)
Returns the number of LonePairs for a given Atom.
|
List<ILonePair> |
getConnectedLonePairsList(IAtom atom)
Returns the array of lone pairs connected to an atom.
|
int |
getConnectedSingleElectronsCount(IAtom atom)
Returns the sum of the SingleElectron for a given Atom.
|
List<ISingleElectron> |
getConnectedSingleElectronsList(IAtom atom)
Returns an array of all SingleElectron connected to the given atom.
|
IElectronContainer |
getElectronContainer(int number)
Returns the ElectronContainer at position
number in the
container. |
int |
getElectronContainerCount()
Returns the number of ElectronContainers in this Container.
|
IAtom |
getFirstAtom()
Returns the atom at position 0 in the container.
|
IAtom |
getLastAtom()
Returns the atom at the last position in the container.
|
ILonePair |
getLonePair(int idx)
Get the lone pair at the specified idx, the index should be in the
range 0 ≤ idx <
IAtomContainer.getLonePairCount() . |
int |
getLonePairCount()
Returns the number of LonePairs in this Container.
|
int |
getLonePairNumber(ILonePair lonePair)
Returns the position of a given lone pair in the lone pair array.
|
IBond.Order |
getMaximumBondOrder(IAtom atom)
Returns the maximum bond order that this atom currently has in the context
of this AtomContainer.
|
IBond.Order |
getMinimumBondOrder(IAtom atom)
Returns the minimum bond order that this atom currently has in the context
of this AtomContainer.
|
ISingleElectron |
getSingleElectron(int idx)
Get the single electron at the specified idx, the index should
be in the range 0 ≤ idx <
IAtomContainer.getSingleElectronCount() . |
int |
getSingleElectronCount()
Returns the number of the single electrons in this container,
|
int |
getSingleElectronNumber(ISingleElectron singleElectron)
Returns the position of a given single electron in the single electron array.
|
String |
getTitle()
Access the title of the record.
|
int |
indexOf(IAtom atom)
Access the storage index of an atom.
|
int |
indexOf(IBond bond)
Access the storage index of a bond.
|
int |
indexOf(ILonePair pair)
Access the storage index of a long pair.
|
int |
indexOf(ISingleElectron electron)
Access the storage index of a single electron (radical).
|
boolean |
isEmpty()
Indicates whether this container is empty.
|
Iterable<ILonePair> |
lonePairs()
Returns an Iterable for looping over all lone pairs in this container.
|
void |
remove(IAtomContainer atomContainer)
Removes all atoms and electronContainers of a given atomcontainer from this
container.
|
void |
removeAllBonds()
Removes all Bonds from this container.
|
void |
removeAllElectronContainers()
Removes electronContainers from this container.
|
void |
removeAllElements()
Removes all atoms and bond from this container.
|
void |
removeAtom(IAtom atom)
Removes the given atom and all connected electronContainers from the
AtomContainer.
|
void |
removeAtom(int pos)
Safely remove an atom from the container.
|
void |
removeAtomAndConnectedElectronContainers(IAtom atom)
Deprecated.
|
void |
removeAtomOnly(IAtom atom)
Removes the given atom from the AtomContainer.
|
void |
removeAtomOnly(int position)
Removes the atom at the given position from the AtomContainer.
|
IBond |
removeBond(IAtom atom1,
IAtom atom2)
Removes the bond that connects the two given atoms.
|
void |
removeBond(IBond bond)
Removes the bond from this container.
|
IBond |
removeBond(int position)
Removes the bond at the given position from the AtomContainer.
|
void |
removeElectronContainer(IElectronContainer electronContainer)
Removes this ElectronContainer from this container.
|
IElectronContainer |
removeElectronContainer(int number)
Removes the bond at the given position from this container.
|
void |
removeLonePair(ILonePair lonePair)
Removes the lone pair from the AtomContainer.
|
ILonePair |
removeLonePair(int position)
Removes the lone pair at the given position from the AtomContainer.
|
ISingleElectron |
removeSingleElectron(int position)
Removes the single electron at the given position from the AtomContainer.
|
void |
removeSingleElectron(ISingleElectron singleElectron)
Removes the single electron from the AtomContainer.
|
void |
setAtom(int idx,
IAtom atom)
Set the atom at
idx , the index must have an existing atom
and therefore be in the range 0 ≤ idx < mol.getAtomCount(). |
void |
setAtoms(IAtom[] atoms)
Sets the array of atoms of this AtomContainer.
|
void |
setBonds(IBond[] bonds)
Sets the array of bonds of this AtomContainer.
|
void |
setStereoElements(List<IStereoElement> elements)
Set the stereo elements - this will replace the existing instance
with a new instance.
|
void |
setTitle(String title)
Modify the title of the record.
|
Iterable<ISingleElectron> |
singleElectrons()
Returns an Iterable for looping over all single electrons in this container.
|
void |
stateChanged(IChemObjectChangeEvent event)
Called by objects to which this object has
registered as a listener.
|
Iterable<IStereoElement> |
stereoElements()
Returns the stereo elements defined for this atom container.
|
String |
toString()
Returns a one line description of this IChemObject.
|
addListener, addProperties, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, matches, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
getBuilder
protected int atomCount
protected int bondCount
protected int lonePairCount
protected int singleElectronCount
protected int growArraySize
protected IAtom[] atoms
protected IBond[] bonds
protected ILonePair[] lonePairs
protected ISingleElectron[] singleElectrons
protected List<IStereoElement> stereoElements
public QueryAtomContainer(IChemObjectBuilder builder)
public QueryAtomContainer(IAtomContainer container, IChemObjectBuilder builder)
container
- An AtomContainer to copy the atoms and electronContainers frompublic QueryAtomContainer(int atomCount, int bondCount, int lpCount, int seCount, IChemObjectBuilder builder)
atomCount
- Number of atoms to be in this containerbondCount
- Number of bonds to be in this containerlpCount
- Number of lone pairs to be in this containerseCount
- Number of single electrons to be in this containerpublic String toString()
IChemObject
toString
in interface IChemObject
toString
in class Object
public void addStereoElement(IStereoElement element)
addStereoElement
in interface IAtomContainer
element
- The new IStereoElement
for this containerIAtomContainer.stereoElements()
public Iterable<IStereoElement> stereoElements()
stereoElements
in interface IAtomContainer
Iterable
of IStereoElement
s.IAtomContainer.addStereoElement(IStereoElement)
public void setAtoms(IAtom[] atoms)
setAtoms
in interface IAtomContainer
atoms
- The array of atoms to be assigned to this AtomContainergetAtom(int)
public void setBonds(IBond[] bonds)
setBonds
in interface IAtomContainer
bonds
- The array of bonds to be assigned to
this AtomContainergetBond(int)
public void setAtom(int idx, IAtom atom)
idx
, the index must have an existing atom
and therefore be in the range 0 ≤ idx < mol.getAtomCount().setAtom
in interface IAtomContainer
idx
- The index of the atom to be set.atom
- The atom to be stored at position idx
IAtomContainer.getAtom(int)
public IAtom getAtom(int idx)
IAtomContainer.getAtomCount()
.getAtom
in interface IAtomContainer
idx
- atom indexIAtomContainer.setAtom(int, org.openscience.cdk.interfaces.IAtom)
public IBond getBond(int idx)
IAtomContainer.getBondCount()
.getBond
in interface IAtomContainer
idx
- bond indexpublic ILonePair getLonePair(int idx)
IAtomContainer.getLonePairCount()
.getLonePair
in interface IAtomContainer
idx
- lone pair indexpublic ISingleElectron getSingleElectron(int idx)
IAtomContainer.getSingleElectronCount()
.getSingleElectron
in interface IAtomContainer
idx
- single electron indexpublic Iterable<IAtom> atoms()
atoms
in interface IAtomContainer
public Iterable<IBond> bonds()
bonds
in interface IAtomContainer
public Iterable<ILonePair> lonePairs()
lonePairs
in interface IAtomContainer
public Iterable<ISingleElectron> singleElectrons()
singleElectrons
in interface IAtomContainer
public Iterable<IElectronContainer> electronContainers()
electronContainers
in interface IAtomContainer
public IAtom getFirstAtom()
getFirstAtom
in interface IAtomContainer
public IAtom getLastAtom()
getLastAtom
in interface IAtomContainer
public int getAtomNumber(IAtom atom)
getAtomNumber
in interface IAtomContainer
atom
- The atom to be soughtpublic int getBondNumber(IAtom atom1, IAtom atom2)
getBondNumber
in interface IAtomContainer
atom1
- The first atomatom2
- The second atompublic int getBondNumber(IBond bond)
getBondNumber
in interface IAtomContainer
bond
- The bond to be soughtpublic int getLonePairNumber(ILonePair lonePair)
getLonePairNumber
in interface IAtomContainer
lonePair
- The lone pair to be soughtpublic int getSingleElectronNumber(ISingleElectron singleElectron)
getSingleElectronNumber
in interface IAtomContainer
singleElectron
- The single electron to be soughtpublic int indexOf(IAtom atom)
IAtomContainer
indexOf
in interface IAtomContainer
atom
- atom instance to findpublic int indexOf(IBond bond)
IAtomContainer
indexOf
in interface IAtomContainer
bond
- bond instance to findpublic int indexOf(ISingleElectron electron)
IAtomContainer
indexOf
in interface IAtomContainer
electron
- the electronpublic int indexOf(ILonePair pair)
IAtomContainer
indexOf
in interface IAtomContainer
pair
- the long pairpublic IElectronContainer getElectronContainer(int number)
number
in the
container.getElectronContainer
in interface IAtomContainer
number
- The position of the ElectronContainer to be returned.number
.IAtomContainer.addElectronContainer(IElectronContainer)
public IBond getBond(IAtom atom1, IAtom atom2)
getBond
in interface IAtomContainer
atom1
- The first atomatom2
- The second atompublic int getAtomCount()
getAtomCount
in interface IAtomContainer
public int getBondCount()
getBondCount
in interface IAtomContainer
public int getLonePairCount()
getLonePairCount
in interface IAtomContainer
public int getSingleElectronCount()
getSingleElectronCount
in interface IAtomContainer
public int getElectronContainerCount()
getElectronContainerCount
in interface IAtomContainer
public List<IAtom> getConnectedAtomsList(IAtom atom)
getConnectedAtomsList
in interface IAtomContainer
atom
- The atom the bond partners are searched of.public List<IBond> getConnectedBondsList(IAtom atom)
getConnectedBondsList
in interface IAtomContainer
atom
- The atom the connected bonds are searched ofpublic List<ILonePair> getConnectedLonePairsList(IAtom atom)
getConnectedLonePairsList
in interface IAtomContainer
atom
- The atom for which to get lone pairsgetElectronContainer(int)
,
electronContainers()
,
getBond(int)
public List<ISingleElectron> getConnectedSingleElectronsList(IAtom atom)
getConnectedSingleElectronsList
in interface IAtomContainer
atom
- The atom on which the single electron is locatedpublic List<IElectronContainer> getConnectedElectronContainersList(IAtom atom)
getConnectedElectronContainersList
in interface IAtomContainer
atom
- The atom the connected electronContainers are searched ofpublic int getConnectedAtomsCount(IAtom atom)
getConnectedAtomsCount
in interface IAtomContainer
atom
- The atom the number of bond partners are searched of.public int getConnectedBondsCount(IAtom atom)
getConnectedBondsCount
in interface IAtomContainer
atom
- The atompublic int getConnectedBondsCount(int idx)
getConnectedBondsCount
in interface IAtomContainer
idx
- The atomnumber the degree is searched forpublic int getConnectedLonePairsCount(IAtom atom)
getConnectedLonePairsCount
in interface IAtomContainer
atom
- The atompublic int getConnectedSingleElectronsCount(IAtom atom)
getConnectedSingleElectronsCount
in interface IAtomContainer
atom
- The atom on which the single electron is locatedpublic double getBondOrderSum(IAtom atom)
AtomContainerManipulator#getBondOrderSum(IAtomContainer, IAtom)
getBondOrderSum
in interface IAtomContainer
atom
- The atompublic IBond.Order getMaximumBondOrder(IAtom atom)
getMaximumBondOrder
in interface IAtomContainer
atom
- The atompublic IBond.Order getMinimumBondOrder(IAtom atom)
getMinimumBondOrder
in interface IAtomContainer
atom
- The atompublic void add(IAtomContainer atomContainer)
add
in interface IAtomContainer
atomContainer
- The atomcontainer to be addedpublic void addAtom(IAtom atom)
addAtom
in interface IAtomContainer
atom
- The atom to be added to this containerpublic void addBond(IBond bond)
addBond
in interface IAtomContainer
bond
- The bond to added to this containerpublic void addLonePair(ILonePair lonePair)
addLonePair
in interface IAtomContainer
lonePair
- The LonePair to added to this containerpublic void addSingleElectron(ISingleElectron singleElectron)
addSingleElectron
in interface IAtomContainer
singleElectron
- The SingleElectron to added to this containerpublic void addElectronContainer(IElectronContainer electronContainer)
addElectronContainer
in interface IAtomContainer
electronContainer
- The ElectronContainer to added to this containerpublic void remove(IAtomContainer atomContainer)
remove
in interface IAtomContainer
atomContainer
- The atomcontainer to be removedpublic void removeAtomOnly(int position)
removeAtomOnly
in interface IAtomContainer
position
- The position of the atom to be removed.public void removeAtomOnly(IAtom atom)
removeAtomOnly
in interface IAtomContainer
atom
- The atom to be removedpublic IBond removeBond(int position)
removeBond
in interface IAtomContainer
position
- The position of the bond to be removed.public IBond removeBond(IAtom atom1, IAtom atom2)
removeBond
in interface IAtomContainer
atom1
- The first atomatom2
- The second atompublic void removeBond(IBond bond)
removeBond
in interface IAtomContainer
bond
- The bond to be removed.public ILonePair removeLonePair(int position)
removeLonePair
in interface IAtomContainer
position
- The position of the LonePair to be removed.public void removeLonePair(ILonePair lonePair)
removeLonePair
in interface IAtomContainer
lonePair
- The LonePair to be removed.public ISingleElectron removeSingleElectron(int position)
removeSingleElectron
in interface IAtomContainer
position
- The position of the SingleElectron to be removed.public void removeSingleElectron(ISingleElectron singleElectron)
removeSingleElectron
in interface IAtomContainer
singleElectron
- The SingleElectron to be removed.public IElectronContainer removeElectronContainer(int number)
removeElectronContainer
in interface IAtomContainer
number
- The position of the bond in the electronContainers arraypublic void removeElectronContainer(IElectronContainer electronContainer)
removeElectronContainer
in interface IAtomContainer
electronContainer
- The electronContainer to be removed@Deprecated public void removeAtomAndConnectedElectronContainers(IAtom atom)
removeAtomAndConnectedElectronContainers
in interface IAtomContainer
IAtomContainer.removeAtom(IAtom)
public void removeAtom(IAtom atom)
removeAtom
in interface IAtomContainer
atom
- The atom to be removedpublic void removeAtom(int pos)
IAtomContainer.remove(IAtomContainer)
.
removeAtom
in interface IAtomContainer
pos
- the position of the atom to be removedpublic void removeAllElements()
removeAllElements
in interface IAtomContainer
public void removeAllElectronContainers()
removeAllElectronContainers
in interface IAtomContainer
public void removeAllBonds()
removeAllBonds
in interface IAtomContainer
public void addBond(int atom1, int atom2, IBond.Order order, IBond.Stereo stereo)
addBond
in interface IAtomContainer
atom1
- Id of the first atom of the Bond in [0,..]atom2
- Id of the second atom of the Bond in [0,..]order
- Bondorderstereo
- Stereochemical orientationpublic void addBond(int atom1, int atom2, IBond.Order order)
addBond
in interface IAtomContainer
atom1
- Id of the first atom of the Bond in [0,..]atom2
- Id of the second atom of the Bond in [0,..]order
- Bondorderpublic void addLonePair(int atomID)
addLonePair
in interface IAtomContainer
atomID
- The atom number to which the LonePair is added in [0,..]public void addSingleElectron(int atomID)
addSingleElectron
in interface IAtomContainer
atomID
- The atom number to which the LonePair is added in [0,..]public boolean contains(IAtom atom)
contains
in interface IAtomContainer
atom
- the atom this AtomContainer is searched forpublic boolean contains(IBond bond)
contains
in interface IAtomContainer
bond
- the bond this AtomContainer is searched forpublic boolean contains(ILonePair lonePair)
contains
in interface IAtomContainer
lonePair
- the LonePair this AtomContainer is searched forpublic boolean contains(ISingleElectron singleElectron)
contains
in interface IAtomContainer
singleElectron
- the LonePair this AtomContainer is searched forpublic boolean contains(IElectronContainer electronContainer)
contains
in interface IAtomContainer
electronContainer
- ElectronContainer that is searched forpublic IQueryAtomContainer clone() throws CloneNotSupportedException
clone
in interface IAtomContainer
clone
in interface IChemObject
clone
in class QueryChemObject
CloneNotSupportedException
- if the IChemObject cannot be clonedQueryAtomContainer(org.openscience.cdk.interfaces.IAtomContainer, org.openscience.cdk.interfaces.IChemObjectBuilder)
public void stateChanged(IChemObjectChangeEvent event)
stateChanged
in interface IChemObjectListener
event
- A change event pointing to the source of the changepublic boolean isEmpty()
isEmpty
in interface IAtomContainer
public String getTitle()
getTitle
in interface IAtomContainer
public void setTitle(String title)
setTitle
in interface IAtomContainer
title
- the titlepublic void setStereoElements(List<IStereoElement> elements)
IAtomContainer
setStereoElements
in interface IAtomContainer
elements
- the new stereo elementspublic static QueryAtomContainer create(IAtomContainer mol, Expr.Type... opts)
opts
will be matched.
// [nH]1ccc(=O)cc1 => n1:c:c:c(=O):c:c:1
QueryAtomContainer.create(mol, ALIPHATIC_ELEMENT,
AROMATIC_ELEMENT,
SINGLE_OR_AROMATIC,
ALIPHATIC_ORDER,
STEREOCHEMISTRY);
Expr.Type.DEGREE
(or Expr.Type.TOTAL_DEGREE
+
Expr.Type.IMPL_H_COUNT
) means the molecule will not match as a
substructure.
// [nH]1ccc(=O)cc1 => [nD2]1:[cD2]:[cD2]:[cD2](=[OD1]):[cD2]:[cD2]:1
QueryAtomContainer.create(mol, ALIPHATIC_ELEMENT,
AROMATIC_ELEMENT,
DEGREE,
SINGLE_OR_AROMATIC,
ALIPHATIC_ORDER);
Expr.Type.RING_BOND_COUNT
property is useful for locking in
ring systems. Specifying the ring bond count on benzene means it will
not match larger ring systems (e.g. naphthalenee) but can still be
substituted.
// [nH]1ccc(=O)cc1 =>
// [nx2+0]1:[cx2+0]:[cx2+0]:[cx2+0](=[O&x0+0]):[cx2+0]:[cx2+0]:1
// IMPORTANT! use Cycles.markRingAtomsAndBonds(mol) to set ring status
QueryAtomContainer.create(mol, ALIPHATIC_ELEMENT,
AROMATIC_ELEMENT,
FORMAL_CHARGE,
ISOTOPE,
RING_BOND_COUNT,
SINGLE_OR_AROMATIC,
ALIPHATIC_ORDER);
Expr.Type.FORMAL_CHARGE
,
Expr.Type.IMPL_H_COUNT
, and Expr.Type.ISOTOPE
are ignored
if null. Explicitly setting these to zero (only required for Isotope from
SMILES) forces their inclusion.
// [nH]1ccc(=O)cc1 =>
// [0n+0]1:[0c+0]:[0c+0]:[0c+0](=[O+0]):[0c+0]:[0c+0]:1
QueryAtomContainer.create(mol, ALIPHATIC_ELEMENT,
AROMATIC_ELEMENT,
FORMAL_CHARGE,
ISOTOPE,
RING_BOND_COUNT,
SINGLE_OR_AROMATIC,
ALIPHATIC_ORDER);
Please note not all Expr.Type
s are currently supported, if you
require a specific type that you think is useful please open an issue.mol
- the moleculeopts
- set of the expr types to matchCopyright © 2018. All Rights Reserved.