$darkmode
DENOPTIM
denoptim.utils.MoleculeUtils Class Reference

Utilities for molecule conversion. More...

Collaboration diagram for denoptim.utils.MoleculeUtils:
[legend]

Static Public Member Functions

static double getMolecularWeight (IAtomContainer mol) throws DENOPTIMException
 
static boolean isDummy (IAtom atm)
 Checks if the given atom is a dummy atom based on the elemental symbol and the string used for dummy atom as a convention in DENOPTIM (uses DENOPTIMConstants#DUMMYATMSYMBOL. More...
 
static boolean isElement (IAtom atom)
 Check element symbol corresponds to real element of Periodic Table. More...
 
static boolean isElement (String symbol)
 Check element symbol corresponds to real element of Periodic Table. More...
 
static void removeRCA (IAtomContainer mol)
 Replace any PseudoAtoms representing ring closing attractors with H. More...
 
static void removeUsedRCA (IAtomContainer mol, DGraph graph, Logger logger) throws DENOPTIMException
 Replace used RCAs (i.e., those involved in Rings) while adding the ring closing bonds. More...
 
static String getSMILESForMolecule (IAtomContainer mol, Logger logger) throws DENOPTIMException
 Returns the SMILES representation of the molecule. More...
 
static IAtomContainer generate2DCoordinates (IAtomContainer ac, Logger logger) throws DENOPTIMException
 Generates 2D coordinates for the molecule. More...
 
static String getInChIKeyForMolecule (IAtomContainer mol, Logger logger) throws DENOPTIMException
 Generates the InChI key for the given atom container. More...
 
static String getInChIKeyForMolecule (IAtomContainer mol, InchiOptions options, Logger logger) throws DENOPTIMException
 Generates the INCHI key for the molecule. More...
 
static int getNumberOfRotatableBonds (IAtomContainer mol) throws DENOPTIMException
 Count number of rotatable bonds. More...
 
static int getHeavyAtomCount (IAtomContainer mol)
 The heavy atom count. More...
 
static int countAtomsOfElement (IAtomContainer mol, String symbol)
 Count atoms with the given elemental symbol. More...
 
static Map< Vertex, ArrayList< Integer > > getVertexToAtomIdMap (ArrayList< Vertex > vertLst, IAtomContainer mol)
 Method to generate the map making in relation DENOPTIMVertex ID and atom index in the IAtomContainer representation of the chemical entity. More...
 
static void moleculeToPNG (IAtomContainer mol, String filename, Logger logger) throws DENOPTIMException
 Generate a PNG image from molecule mol More...
 
static Point3d getPoint3d (IAtom atm)
 Return the 3D coordinates, if present. More...
 
static void setZeroImplicitHydrogensToAllAtoms (IAtomContainer iac)
 Sets zero implicit hydrogen count to all atoms. More...
 
static void explicitHydrogens (IAtomContainer mol)
 Converts all the implicit hydrogens to explicit. More...
 
static void ensureNoUnsetBondOrdersSilent (IAtomContainer iac)
 Sets bond order = single to all otherwise unset bonds. More...
 
static void ensureNoUnsetBondOrders (IAtomContainer iac) throws CDKException
 Sets bond order = single to all otherwise unset bonds. More...
 
static String missmatchingAromaticity (IAtomContainer mol)
 Looks for carbon atoms that are flagged as aromatic, but do not have any double bond and are, therefore, not properly Kekularized. More...
 
static int numOfBondsWithBO (IAtom atm, IAtomContainer mol, IBond.Order order)
 Returns the number of bonds, with a certain bond order, surrounding the given atom. More...
 
static IAtomContainer makeSameAs (IAtomContainer mol) throws DENOPTIMException
 Constructs a copy of an atom container, i.e., a molecule that reflects the one given in the input argument in terms of atom count, type, and geometric properties, and bond count and type. More...
 
static IAtom makeSameAtomAs (IAtom oAtm)
 Method that constructs an atom that reflect the same atom given as parameter in terms of element symbol (or label, for pseudoatoms), and Cartesian coordinates, and most of the other attributes. More...
 
static IAtom makeSameAtomAs (IAtom oAtm, boolean ignoreValence, boolean ignoreImplicitH)
 Method that constructs an atom that reflect the same atom given as parameter in terms of element symbol (or label, for pseudoatoms), and Cartesian coordinates, and most of the other attributes unless otherwise specified by the flags. More...
 
static String getSymbolOrLabel (IAtom atm)
 Gets either the elemental symbol (for standard atoms) of the label (for pseudo-atoms). More...
 
static String getAtomRef (IAtom atm, IAtomContainer mol)
 
static Point3d calculateCentroid (IAtomContainer mol)
 Calculated the centroid of the given molecule. More...
 
static IAtomContainer extractIACForSubgraph (IAtomContainer wholeIAC, DGraph subGraph, DGraph wholeGraph, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Selects only the atoms that originate from a subgraph of a whole graph that originated the whole molecule given as parameter. More...
 
static int getDimensions (IAtomContainer mol)
 Determines the dimensionality of the given chemical object. More...
 

Static Private Attributes

static final StructureDiagramGenerator SDG
 
static final SmilesGenerator SMGEN
 
static final IChemObjectBuilder builder
 

Detailed Description

Utilities for molecule conversion.

Author
Vishwesh Venkatraman
Marco Foscato

Definition at line 93 of file MoleculeUtils.java.

Member Function Documentation

◆ calculateCentroid()

static Point3d denoptim.utils.MoleculeUtils.calculateCentroid ( IAtomContainer  mol)
static

Calculated the centroid of the given molecule.

Parameters
mol
Returns
the centroid.

Definition at line 1026 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.getPoint3d().

Referenced by denoptim.molecularmodeling.ThreeDimTreeBuilder.getRandomPoint(), and denoptim.utils.MoleculeUtilsTest.testCalculateCentroid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ countAtomsOfElement()

static int denoptim.utils.MoleculeUtils.countAtomsOfElement ( IAtomContainer  mol,
String  symbol 
)
static

Count atoms with the given elemental symbol.

Parameters
molMolecule to count atoms in.
symbolthe elemental symbol to look for.
Returns
the total number of those elements.

Definition at line 571 of file MoleculeUtils.java.

Referenced by denoptim.graph.TemplateTest.testGetIAtomContainer(), and denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex().

Here is the caller graph for this function:

◆ ensureNoUnsetBondOrders()

static void denoptim.utils.MoleculeUtils.ensureNoUnsetBondOrders ( IAtomContainer  iac) throws CDKException
static

Sets bond order = single to all otherwise unset bonds.

In case of failed kekulization this method reports a warning but does not throw an exception.

Parameters
iacthe container to process
Exceptions
CDKException

Definition at line 753 of file MoleculeUtils.java.

Referenced by denoptim.utils.MoleculeUtils.ensureNoUnsetBondOrdersSilent(), and denoptim.fragmenter.FragmenterTools.prepareMolToFragmentation().

Here is the caller graph for this function:

◆ ensureNoUnsetBondOrdersSilent()

static void denoptim.utils.MoleculeUtils.ensureNoUnsetBondOrdersSilent ( IAtomContainer  iac)
static

Sets bond order = single to all otherwise unset bonds.

In case of failed kekulization this method reports a warning but does not throw an exception.

Parameters
iacthe container to process

Definition at line 725 of file MoleculeUtils.java.

References denoptim.logging.StaticLogger.appLogger, and denoptim.utils.MoleculeUtils.ensureNoUnsetBondOrders().

Referenced by denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.utils.MoleculeUtils.getSMILESForMolecule(), and denoptim.utils.ManySMARTSQuery.ManySMARTSQuery().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ explicitHydrogens()

static void denoptim.utils.MoleculeUtils.explicitHydrogens ( IAtomContainer  mol)
static

Converts all the implicit hydrogens to explicit.

Definition at line 710 of file MoleculeUtils.java.

Referenced by denoptim.fragmenter.FragmenterTools.prepareMolToFragmentation().

Here is the caller graph for this function:

◆ extractIACForSubgraph()

static IAtomContainer denoptim.utils.MoleculeUtils.extractIACForSubgraph ( IAtomContainer  wholeIAC,
DGraph  subGraph,
DGraph  wholeGraph,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Selects only the atoms that originate from a subgraph of a whole graph that originated the whole molecule given as parameter.

Parameters
wholeIACthe molecular representation of the whole graph. The atoms contained here are expected to be have the property DENOPTIMConstants#ATMPROPVERTEXID, which is used to identify which atoms originated from which vertex of the whole graph.
subGraphthe portion of the whole graph for which we want the corresponding atoms. The vertexes are expected to have the DENOPTIMConstants#STOREDVID property that defines their original vertex ID in the whole graph. These labels are expected to be consistent with those in the property DENOPTIMConstants#ATMPROPVERTEXID of the wholeIAC parameter. Note that the current vertexID of each vertex can be different from the ID of the original vertex had in the while graph.
Returns
a new container with the requested substructure
Exceptions
DENOPTIMException

Definition at line 1060 of file MoleculeUtils.java.

References denoptim.graph.Fragment.addAPOnAtom(), denoptim.constants.DENOPTIMConstants.ATMPROPVERTEXID, denoptim.graph.Fragment.bonds(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.Fragment.getAtom(), denoptim.graph.Fragment.getIAtomContainer(), denoptim.graph.AttachmentPoint.getIndexInOwner(), denoptim.utils.MoleculeUtils.getPoint3d(), denoptim.constants.DENOPTIMConstants.LINKAPS, denoptim.utils.MoleculeUtils.makeSameAs(), denoptim.graph.Fragment.removeAtom(), denoptim.graph.Fragment.removeBond(), denoptim.graph.AttachmentPoint.setProperty(), denoptim.constants.DENOPTIMConstants.STOREDVID, denoptim.graph.Fragment.updateAPs(), and denoptim.io.DenoptimIO.writeGraphToSDF().

Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate2DCoordinates()

static IAtomContainer denoptim.utils.MoleculeUtils.generate2DCoordinates ( IAtomContainer  ac,
Logger  logger 
) throws DENOPTIMException
static

Generates 2D coordinates for the molecule.

Parameters
acthe molecule to layout.
loggerprogram-specific logger.
Returns
A new molecule laid out in 2D. If the molecule already has 2D coordinates then it is returned unchanged. If layout fails then null is returned.
Exceptions
denoptim.exception.DENOPTIMException

Definition at line 384 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.builder, denoptim.constants.DENOPTIMConstants.DUMMYATMSYMBOL, denoptim.utils.DummyAtomHandler.removeDummyInHapto(), denoptim.utils.MoleculeUtils.removeRCA(), and denoptim.utils.MoleculeUtils.SDG.

Referenced by denoptim.utils.MoleculeUtils.moleculeToPNG().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAtomRef()

static String denoptim.utils.MoleculeUtils.getAtomRef ( IAtom  atm,
IAtomContainer  mol 
)
static
Returns
a string with the element symbol and the atom number (1-based) of the given atom.

Definition at line 1014 of file MoleculeUtils.java.

Referenced by denoptim.utils.MoleculeUtils.missmatchingAromaticity().

Here is the caller graph for this function:

◆ getDimensions()

static int denoptim.utils.MoleculeUtils.getDimensions ( IAtomContainer  mol)
static

Determines the dimensionality of the given chemical object.

Parameters
molthe given chemical object
Returns
dimensionality of this object: 2, or 3, or -1 if neither 2 nor 3.

Definition at line 1219 of file MoleculeUtils.java.

Referenced by denoptim.fragmenter.FragmenterTools.manageFragmentCollection().

Here is the caller graph for this function:

◆ getHeavyAtomCount()

static int denoptim.utils.MoleculeUtils.getHeavyAtomCount ( IAtomContainer  mol)
static

The heavy atom count.

Parameters
molMolecule to count heavy atoms in
Returns
heavy atom count

Definition at line 550 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.getSymbolOrLabel(), and denoptim.utils.MoleculeUtils.isElement().

Referenced by denoptim.graph.DGraph.checkConsistency(), and denoptim.graph.Fragment.getHeavyAtomsCount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInChIKeyForMolecule() [1/2]

static String denoptim.utils.MoleculeUtils.getInChIKeyForMolecule ( IAtomContainer  mol,
InchiOptions  options,
Logger  logger 
) throws DENOPTIMException
static

Generates the INCHI key for the molecule.

Parameters
molthe molecule
loggerprogram-specific logger.
Returns
the InchiKey. null if error
Exceptions
denoptim.exception.DENOPTIMException

Definition at line 467 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.builder, denoptim.constants.DENOPTIMConstants.DUMMYATMSYMBOL, denoptim.utils.DummyAtomHandler.removeDummyInHapto(), and denoptim.utils.MoleculeUtils.removeRCA().

Here is the call graph for this function:

◆ getInChIKeyForMolecule() [2/2]

static String denoptim.utils.MoleculeUtils.getInChIKeyForMolecule ( IAtomContainer  mol,
Logger  logger 
) throws DENOPTIMException
static

Generates the InChI key for the given atom container.

By default we produce a non-standard InChI using the flags InchiFlag#AuxNone, InchiFlag#RecMet, and InchiFlag#SUU.

Parameters
molthe molecule
loggerprogram-specific logger.
Returns
the InchiKey. null if error
Exceptions
denoptim.exception.DENOPTIMException

Definition at line 447 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.getInChIKeyForMolecule().

Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.graph.DGraph.checkConsistency(), denoptim.utils.MoleculeUtils.getInChIKeyForMolecule(), and denoptim.ga.EAUtils.setupRings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMolecularWeight()

static double denoptim.utils.MoleculeUtils.getMolecularWeight ( IAtomContainer  mol) throws DENOPTIMException
static

Definition at line 104 of file MoleculeUtils.java.

Referenced by denoptim.graph.DGraph.checkConsistency().

Here is the caller graph for this function:

◆ getNumberOfRotatableBonds()

static int denoptim.utils.MoleculeUtils.getNumberOfRotatableBonds ( IAtomContainer  mol) throws DENOPTIMException
static

Count number of rotatable bonds.

Parameters
molmolecule to count rotatable bonds in
Returns
number of rotatable bonds
Exceptions
DENOPTIMException

Definition at line 524 of file MoleculeUtils.java.

Referenced by denoptim.graph.DGraph.checkConsistency().

Here is the caller graph for this function:

◆ getPoint3d()

◆ getSMILESForMolecule()

static String denoptim.utils.MoleculeUtils.getSMILESForMolecule ( IAtomContainer  mol,
Logger  logger 
) throws DENOPTIMException
static

Returns the SMILES representation of the molecule.

All atoms are expected to be explicit, as we set the count of implicit H to zero for all atoms.

Parameters
molthe molecule
loggerprogram.specific logger.
Returns
smiles string
Exceptions
DENOPTIMException

Definition at line 330 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.builder, denoptim.constants.DENOPTIMConstants.DUMMYATMSYMBOL, denoptim.utils.MoleculeUtils.ensureNoUnsetBondOrdersSilent(), denoptim.utils.DummyAtomHandler.removeDummy(), denoptim.utils.DummyAtomHandler.removeDummyInHapto(), denoptim.utils.MoleculeUtils.removeRCA(), denoptim.utils.MoleculeUtils.setZeroImplicitHydrogensToAllAtoms(), denoptim.utils.MoleculeUtils.SMGEN, and denoptim.io.DenoptimIO.writeSDFFile().

Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.graph.DGraph.checkConsistency(), denoptim.gui.FragmentViewPanel.getLoadedStructure(), and denoptim.ga.EAUtils.setupRings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSymbolOrLabel()

static String denoptim.utils.MoleculeUtils.getSymbolOrLabel ( IAtom  atm)
static

Gets either the elemental symbol (for standard atoms) of the label (for pseudo-atoms).

Other classes implementing IAtom are not considered. This method is a response to the change from CDK-1.* to CDK-2.*. In the old CDK-1.* the getSymbol() method of IAtom would return the label for a PseudoAtom, but this behavior is not retained in newer versions.

Parameters
atm
Returns
either the element symbol of the label

Definition at line 979 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.isElement().

Referenced by denoptim.graph.DGraph.checkConsistency(), denoptim.graph.rings.PathClosabilityTools.evaluateConstitutionalClosability(), denoptim.fragmenter.FragmenterTools.filterFragment(), denoptim.graph.FragIsomorphNode.FragIsomorphNode(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.utils.MoleculeUtils.getHeavyAtomCount(), denoptim.integration.tinker.TinkerUtils.getICFromIAC(), denoptim.graph.Fragment.getJGraphFragIsomorphism(), denoptim.integration.tinker.TinkerUtils.getThirdRefAtomId(), denoptim.utils.MoleculeUtils.isDummy(), denoptim.ga.EAUtils.makeGraphFromFragmentationOfMol(), denoptim.utils.MoleculeUtils.makeSameAtomAs(), denoptim.utils.DummyAtomHandler.removeDummy(), denoptim.utils.DummyAtomHandler.removeDummyInHapto(), denoptim.utils.MoleculeUtils.removeRCA(), denoptim.graph.rings.RingClosingAttractor.RingClosingAttractor(), denoptim.json.IAtomContainerSerializer.serialize(), denoptim.json.DENOPTIMgsonTest.testIAtomContainerToJSONAndBack(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_linearities(), denoptim.json.DENOPTIMgsonTest.testMolecularFragmentSerialization(), denoptim.json.DENOPTIMgsonTest.testTemplateSerialization(), denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates(), and denoptim.graph.rings.RingClosingAttractor.toString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVertexToAtomIdMap()

static Map< Vertex, ArrayList< Integer > > denoptim.utils.MoleculeUtils.getVertexToAtomIdMap ( ArrayList< Vertex vertLst,
IAtomContainer  mol 
)
static

Method to generate the map making in relation DENOPTIMVertex ID and atom index in the IAtomContainer representation of the chemical entity.

Note that the IAtomContainer must have been generated from the DENOPTIMGraph that contains the required DENOPTIMVertexs.

Parameters
vertLstthe list of DENOPTIMVertex to find
molthe molecular representation
Returns
the map of atom indexes per each DENOPTIMVertex ID

Definition at line 595 of file MoleculeUtils.java.

References denoptim.constants.DENOPTIMConstants.ATMPROPVERTEXID.

Referenced by denoptim.graph.rings.PathClosabilityTools.evaluateConstitutionalClosability(), denoptim.graph.rings.RingSizeManager.initialize(), and denoptim.utils.MoleculeUtils.removeUsedRCA().

Here is the caller graph for this function:

◆ isDummy()

static boolean denoptim.utils.MoleculeUtils.isDummy ( IAtom  atm)
static

Checks if the given atom is a dummy atom based on the elemental symbol and the string used for dummy atom as a convention in DENOPTIM (uses DENOPTIMConstants#DUMMYATMSYMBOL.

For detecting dummy atoms beyond DENOPTIM's convention, use DummyAtomHandler.

Parameters
atm
Returns
true if the symbol of the atom indicates this is a dummy atom according to DENOPTIM's convention.

Definition at line 134 of file MoleculeUtils.java.

References denoptim.constants.DENOPTIMConstants.DUMMYATMSYMBOL, and denoptim.utils.MoleculeUtils.getSymbolOrLabel().

Referenced by denoptim.utils.DummyAtomHandler.addDummiesOnLinearities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isElement() [1/2]

static boolean denoptim.utils.MoleculeUtils.isElement ( IAtom  atom)
static

Check element symbol corresponds to real element of Periodic Table.

Parameters
atomto check.
Returns
true if the element symbol correspond to an atom in the periodic table.

Definition at line 149 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.isElement().

Referenced by denoptim.fragmenter.FragmenterTools.filterFragment(), denoptim.utils.MoleculeUtils.getHeavyAtomCount(), denoptim.utils.MoleculeUtils.getSymbolOrLabel(), denoptim.utils.MoleculeUtils.isElement(), denoptim.utils.MoleculeUtils.makeSameAtomAs(), denoptim.programs.fragmenter.CuttingRule.satisfiesOptions(), and denoptim.json.LWAtom.toIAtom().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isElement() [2/2]

static boolean denoptim.utils.MoleculeUtils.isElement ( String  symbol)
static

Check element symbol corresponds to real element of Periodic Table.

Parameters
symbolof the element to check
Returns
true if the element symbol correspond to an atom in the periodic table.

Definition at line 164 of file MoleculeUtils.java.

◆ makeSameAs()

static IAtomContainer denoptim.utils.MoleculeUtils.makeSameAs ( IAtomContainer  mol) throws DENOPTIMException
static

Constructs a copy of an atom container, i.e., a molecule that reflects the one given in the input argument in terms of atom count, type, and geometric properties, and bond count and type.

Other properties are not copied.

Parameters
molthe container to copy.
Returns
the chemical-copy of the input argument.
Exceptions
DENOPTIMExceptionif there are bonds involving more than two atoms.

Definition at line 860 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.builder, and denoptim.utils.MoleculeUtils.makeSameAtomAs().

Referenced by denoptim.graph.Candidate.Candidate(), denoptim.graph.Candidate.clone(), denoptim.graph.Fragment.clone(), denoptim.graph.Template.clone(), denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.graph.Fragment.Fragment(), denoptim.graph.Candidate.fromAtomContainerNoGraph(), and denoptim.gui.VertexAsTwoDimStructureViewPanel.TwoDimStructurePanel.TwoDimStructurePanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeSameAtomAs() [1/2]

static IAtom denoptim.utils.MoleculeUtils.makeSameAtomAs ( IAtom  oAtm)
static

Method that constructs an atom that reflect the same atom given as parameter in terms of element symbol (or label, for pseudoatoms), and Cartesian coordinates, and most of the other attributes.

This method copies valence and implicit H count, in addition to most of the fields accessible via IAtom. Use makeSameAtomAs(IAtom, boolean, boolean) to have the option to exclude valence and implicit H count. This is basically a cloning method that ignores some fields.

Parameters
oAtmthe original
Returns
the copy of the original

Definition at line 899 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.makeSameAtomAs().

Referenced by denoptim.utils.AtomOrganizer.makeReorderedCopy(), denoptim.utils.MoleculeUtils.makeSameAs(), and denoptim.utils.MoleculeUtils.makeSameAtomAs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeSameAtomAs() [2/2]

static IAtom denoptim.utils.MoleculeUtils.makeSameAtomAs ( IAtom  oAtm,
boolean  ignoreValence,
boolean  ignoreImplicitH 
)
static

Method that constructs an atom that reflect the same atom given as parameter in terms of element symbol (or label, for pseudoatoms), and Cartesian coordinates, and most of the other attributes unless otherwise specified by the flags.

This is basically a cloning method that ignores some fields.

Parameters
oAtmthe original
ignoreValenceif true the returned atom will have null valence
ignoreImplicitHif true the returned atom will have null implicit hydrogen count.
Returns
the copy of the original

Definition at line 919 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.getSymbolOrLabel(), and denoptim.utils.MoleculeUtils.isElement().

Here is the call graph for this function:

◆ missmatchingAromaticity()

static String denoptim.utils.MoleculeUtils.missmatchingAromaticity ( IAtomContainer  mol)
static

Looks for carbon atoms that are flagged as aromatic, but do not have any double bond and are, therefore, not properly Kekularized.

Parameters
molthe molecule to analyze.
Returns
a non-empty string if there is any carbon atom that does not look properly Kekularized.

Definition at line 775 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.getAtomRef(), and denoptim.utils.MoleculeUtils.numOfBondsWithBO().

Here is the call graph for this function:

◆ moleculeToPNG()

static void denoptim.utils.MoleculeUtils.moleculeToPNG ( IAtomContainer  mol,
String  filename,
Logger  logger 
) throws DENOPTIMException
static

Generate a PNG image from molecule mol

Parameters
molgenerate molecule PNG from
filenamename of file to store generated PNG as
loggerprogram-specific logger.
Exceptions
DENOPTIMException

Definition at line 639 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.generate2DCoordinates().

Referenced by denoptim.task.FitnessTask.runFitnessProvider().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ numOfBondsWithBO()

static int denoptim.utils.MoleculeUtils.numOfBondsWithBO ( IAtom  atm,
IAtomContainer  mol,
IBond.Order  order 
)
static

Returns the number of bonds, with a certain bond order, surrounding the given atom.

Parameters
atmthe atom to look at
molits container
orderthe bond order to count.
Returns
the number of bonds with that order.

Definition at line 837 of file MoleculeUtils.java.

Referenced by denoptim.utils.MoleculeUtils.missmatchingAromaticity().

Here is the caller graph for this function:

◆ removeRCA()

static void denoptim.utils.MoleculeUtils.removeRCA ( IAtomContainer  mol)
static

Replace any PseudoAtoms representing ring closing attractors with H.

No change in coordinates, but any reference to the original atom, beyond those managed internally to the CDK library, will be broken.

Parameters
molMolecule to replace PseudoAtoms of.

Definition at line 190 of file MoleculeUtils.java.

References denoptim.utils.MoleculeUtils.getSymbolOrLabel(), and denoptim.graph.rings.RingClosingAttractor.RCATYPEMAP.

Referenced by denoptim.utils.RotationalSpaceUtils.defineRotatableBonds(), denoptim.graph.rings.PathClosabilityTools.evaluateConstitutionalClosability(), denoptim.utils.MoleculeUtils.generate2DCoordinates(), denoptim.utils.MoleculeUtils.getInChIKeyForMolecule(), and denoptim.utils.MoleculeUtils.getSMILESForMolecule().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeUsedRCA()

static void denoptim.utils.MoleculeUtils.removeUsedRCA ( IAtomContainer  mol,
DGraph  graph,
Logger  logger 
) throws DENOPTIMException
static

Replace used RCAs (i.e., those involved in Rings) while adding the ring closing bonds.

Does not alter the graph.

Parameters
molthe molecular representation to be updated
graphthe corresponding graph representation
Exceptions
DENOPTIMException

Definition at line 224 of file MoleculeUtils.java.

References denoptim.graph.Edge.BondType.getCDKOrder(), denoptim.utils.MoleculeUtils.getVertexToAtomIdMap(), and denoptim.graph.Edge.BondType.hasCDKAnalogue().

Referenced by denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), and denoptim.gui.GraphVertexMolViewerPanel.updateMolevularViewer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setZeroImplicitHydrogensToAllAtoms()

static void denoptim.utils.MoleculeUtils.setZeroImplicitHydrogensToAllAtoms ( IAtomContainer  iac)
static

Sets zero implicit hydrogen count to all atoms.

Parameters
iacthe container to process

Definition at line 698 of file MoleculeUtils.java.

Referenced by denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.graph.Fragment.Fragment(), denoptim.utils.MoleculeUtils.getSMILESForMolecule(), denoptim.utils.ManySMARTSQuery.ManySMARTSQuery(), and denoptim.fragmenter.FragmenterTools.prepareMolToFragmentation().

Here is the caller graph for this function:

Member Data Documentation

◆ builder

final IChemObjectBuilder denoptim.utils.MoleculeUtils.builder
staticprivate

◆ SDG

final StructureDiagramGenerator denoptim.utils.MoleculeUtils.SDG
staticprivate
Initial value:
=
new StructureDiagramGenerator()

Definition at line 95 of file MoleculeUtils.java.

Referenced by denoptim.utils.MoleculeUtils.generate2DCoordinates().

◆ SMGEN

final SmilesGenerator denoptim.utils.MoleculeUtils.SMGEN
staticprivate
Initial value:
= new SmilesGenerator(
SmiFlavor.Generic)

Definition at line 97 of file MoleculeUtils.java.

Referenced by denoptim.utils.MoleculeUtils.getSMILESForMolecule().


The documentation for this class was generated from the following file: