$darkmode
DENOPTIM
denoptim.utils.DummyAtomHandler Class Reference

Toll to add/remove dummy atoms from linearities or multi-hapto sites. More...

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

Public Member Functions

 DummyAtomHandler (String elm, Logger logger)
 Constructor defining a specific elemental symbol to consider the symbol of dummy atoms. More...
 
IAtomContainer removeDummy (IAtomContainer mol)
 Removes all dummy atoms and the bonds connecting them to other atoms. More...
 
IAtomContainer removeDummyInHapto (IAtomContainer mol) throws DENOPTIMException
 

Static Public Member Functions

static void addDummiesOnLinearities (Fragment frag, double angLim)
 Append dummy atoms on otherwise linear arrangements of atoms. More...
 
static IAtom getDummyInSafeDirection (IAtom atmA, Point3d pB, IAtomContainer mol, List< Point3d > placesToAvoid)
 Generates a dummy atom 0.1 nm from atom A in a place that is safe for a dummy atom. More...
 

Package Attributes

int recNum = 1
 

Private Member Functions

Set< IAtom > exploreConnectedToAtom (IAtom seed, List< IAtom > inList, IAtomContainer mol, List< Boolean > doneFlag)
 Explore connected systems in a list of atoms and returns all the atoms that can be reached starting from the seed atom by moving only along connections between atoms in the initial list. More...
 
List< Boolean > getFlagsVector (int size)
 Generates a vector of boolean flags. More...
 

Static Private Member Functions

static int getSDFAtomNumber (IAtomContainer mol, IAtom atm)
 

Private Attributes

String elm = ""
 The elemental symbol that we consider to be the symbol of a dummy atom. More...
 
Logger logger
 Program-specific logger. More...
 

Detailed Description

Toll to add/remove dummy atoms from linearities or multi-hapto sites.

Author
Marco Foscato
Vishwesh Venkatraman

Definition at line 53 of file DummyAtomHandler.java.

Constructor & Destructor Documentation

◆ DummyAtomHandler()

denoptim.utils.DummyAtomHandler.DummyAtomHandler ( String  elm,
Logger  logger 
)

Constructor defining a specific elemental symbol to consider the symbol of dummy atoms.

Parameters
elmthe elemental symbol that we consider to be the symbol of a dummy atom.
logger

Definition at line 78 of file DummyAtomHandler.java.

References denoptim.utils.DummyAtomHandler.elm, and denoptim.utils.DummyAtomHandler.logger.

Member Function Documentation

◆ addDummiesOnLinearities()

static void denoptim.utils.DummyAtomHandler.addDummiesOnLinearities ( Fragment  frag,
double  angLim 
)
static

Append dummy atoms on otherwise linear arrangements of atoms.

This to allow the use of internal coordinates when doing 3d-modeling. Dummy atoms are connected to the central atom of a linear (or close-to-linear) bend. Attachment points are also taken into account. Dummy atoms with no attachment point and only one connected neighbor are assumed to be linearity-breaking dummy atoms. Therefore, no additional dummy is added on central atoms that already have such neighbor.

Parameters
fragthe fragment to be modified.
angLimthe upper limit for an angle before we consider it flat, i.e., 180 DEG angle.

Definition at line 427 of file DummyAtomHandler.java.

References denoptim.graph.Fragment.addAtom(), denoptim.graph.Fragment.addBond(), denoptim.utils.MathUtils.angle(), denoptim.graph.Fragment.atoms(), denoptim.graph.Fragment.getAPCountOnAtom(), denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.Fragment.getConnectedAtomsCount(), denoptim.graph.Fragment.getConnectedAtomsList(), denoptim.utils.DummyAtomHandler.getDummyInSafeDirection(), denoptim.graph.Fragment.getIAtomContainer(), denoptim.utils.MoleculeUtils.getPoint3d(), and denoptim.utils.MoleculeUtils.isDummy().

Referenced by denoptim.gui.GUIVertexInspector.initialize(), denoptim.ga.EAUtils.makeGraphFromFragmentationOfMol(), denoptim.fragmenter.FragmenterTools.manageFragmentCollection(), and denoptim.graph.FragmentTest.testIsomorphicInLinear().

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

◆ exploreConnectedToAtom()

Set< IAtom > denoptim.utils.DummyAtomHandler.exploreConnectedToAtom ( IAtom  seed,
List< IAtom >  inList,
IAtomContainer  mol,
List< Boolean >  doneFlag 
)
private

Explore connected systems in a list of atoms and returns all the atoms that can be reached starting from the seed atom by moving only along connections between atoms in the initial list.

Parameters
seedthe atom from which to start
inListlist of atoms to be considered
molthe molecular object containing all atoms in inList
doneFlagvector of boolean flags
Returns
the group of atoms reachable via bonds between atoms in inList

Definition at line 358 of file DummyAtomHandler.java.

References denoptim.utils.DummyAtomHandler.exploreConnectedToAtom(), and denoptim.utils.DummyAtomHandler.recNum.

Referenced by denoptim.utils.DummyAtomHandler.exploreConnectedToAtom(), and denoptim.utils.DummyAtomHandler.removeDummyInHapto().

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

◆ getDummyInSafeDirection()

static IAtom denoptim.utils.DummyAtomHandler.getDummyInSafeDirection ( IAtom  atmA,
Point3d  pB,
IAtomContainer  mol,
List< Point3d >  placesToAvoid 
)
static

Generates a dummy atom 0.1 nm from atom A in a place that is safe for a dummy atom.

The be safe the position of the dummy has to respect 2 criteria:

  1. be not too close to an existing atom connected to A,
  2. be not too close to be opposite to an atom connected to A, which means, do not create linearities.

The method try to use 90 and 45 DEG with respect to vector departing from atom A in direction given by point B.

Parameters
atmAfirst atom used to place the dummy
pBpoint defining the direction of interest when placing the dummy atom.
molthe molecular system
placesToAvoidpoints from which the new dummy should stay away.
Returns
the dummy atom

Definition at line 514 of file DummyAtomHandler.java.

References denoptim.constants.DENOPTIMConstants.DUMMYATMSYMBOL, denoptim.utils.CartesianSpaceUtils.getDiffOfVector(), denoptim.utils.CartesianSpaceUtils.getNormalDirection(), denoptim.utils.MoleculeUtils.getPoint3d(), denoptim.utils.CartesianSpaceUtils.getSumOfVector(), denoptim.utils.CartesianSpaceUtils.getVectorFromTo(), denoptim.utils.CartesianSpaceUtils.rotatedVectorWAxisAngle(), and denoptim.utils.CartesianSpaceUtils.translateOrigin().

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

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

◆ getFlagsVector()

List< Boolean > denoptim.utils.DummyAtomHandler.getFlagsVector ( int  size)
private

Generates a vector of boolean flags.

The size of the vector equals the number of atoms in the IAtomContainer. All flags are initialized to false.

Parameters
sizeof vector of flags has to be generated.
Returns
a vector of flags.

Definition at line 395 of file DummyAtomHandler.java.

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

Here is the caller graph for this function:

◆ getSDFAtomNumber()

static int denoptim.utils.DummyAtomHandler.getSDFAtomNumber ( IAtomContainer  mol,
IAtom  atm 
)
staticprivate

Definition at line 407 of file DummyAtomHandler.java.

Referenced by denoptim.utils.DummyAtomHandler.removeDummy(), and denoptim.utils.DummyAtomHandler.removeDummyInHapto().

Here is the caller graph for this function:

◆ removeDummy()

IAtomContainer denoptim.utils.DummyAtomHandler.removeDummy ( IAtomContainer  mol)

Removes all dummy atoms and the bonds connecting them to other atoms.

Definition at line 90 of file DummyAtomHandler.java.

References denoptim.constants.DENOPTIMConstants.DUMMYATMSYMBOL, denoptim.utils.DummyAtomHandler.elm, denoptim.utils.DummyAtomHandler.getSDFAtomNumber(), denoptim.utils.MoleculeUtils.getSymbolOrLabel(), denoptim.utils.DummyAtomHandler.logger, and denoptim.io.DenoptimIO.NL.

Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.buildMulti3DStructure(), denoptim.fitness.FitnessProvider.getFitness(), and denoptim.utils.MoleculeUtils.getSMILESForMolecule().

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

◆ removeDummyInHapto()

IAtomContainer denoptim.utils.DummyAtomHandler.removeDummyInHapto ( IAtomContainer  mol) throws DENOPTIMException

Member Data Documentation

◆ elm

String denoptim.utils.DummyAtomHandler.elm = ""
private

The elemental symbol that we consider to be the symbol of a dummy atom.

Definition at line 58 of file DummyAtomHandler.java.

Referenced by denoptim.utils.DummyAtomHandler.DummyAtomHandler(), denoptim.utils.DummyAtomHandler.removeDummy(), and denoptim.utils.DummyAtomHandler.removeDummyInHapto().

◆ logger

Logger denoptim.utils.DummyAtomHandler.logger
private

◆ recNum

int denoptim.utils.DummyAtomHandler.recNum = 1
package

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