$darkmode
DENOPTIM
denoptim.utils.AtomOrganizer Class Reference

Tool for re-organizing the list of atoms of an IAtomContainer More...

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

Public Member Functions

 AtomOrganizer ()
 
void setScheme (int scheme)
 
ArrayList< Integer > getNewToOldOrder (int seed)
 Returns the list of indexes that allow to map the new atom position with the old one. More...
 
ArrayList< Integer > getOldToNewOrder (int seed)
 Returns the list of indexes that allow to map the old atom position with the new one. More...
 
IAtomContainer reorderStartingFrom (int seed, IAtomContainer mol) throws DENOPTIMException
 Reorder the atoms in mol starting with atom seed More...
 

Static Public Member Functions

static IAtomContainer makeReorderedCopy (IAtomContainer original, List< Integer > newToOldOrder, List< Integer > oldToNewOrder) throws DENOPTIMException
 Produces a new container that looks very similar to the original one, but has a different atom order. More...
 

Private Member Functions

void branchOrienterReordering (int seed, int flag, IAtomContainer mol)
 Reorders atoms according to the branch-oriented scheme. More...
 
void exploreMolecule (int seed, int flag, IAtomContainer mol, int ap)
 Method meant for recursion on all atoms connected to a starting point. More...
 
void layerOrientedReordering (int seed, int flag, IAtomContainer mol)
 Reorders atoms according to the layer-oriented scheme. More...
 
void addAtomToLayer (int atmidx, int ap, int layer, int doneFlag)
 Set the layer membership of an antom. More...
 
void processAtom (int atmidx, int ap, int doneFlag)
 Perform all the operation to report an atom in the new order. More...
 
List< IAtom > prioritizeAtomList (List< IAtom > inList, IAtomContainer mol)
 Change the order of atoms in a list according to the priority rules defined in the comparator ConnectedLigandComparator. More...
 
int getFreeAtomsFlag (IAtomContainer mol)
 Generates a vector of boolean flags. More...
 
void deleteAtomsFlag (int flagID)
 Destroy a vector of flags. More...
 

Private Attributes

ArrayList< ArrayList< Boolean > > flags
 
Map< Integer, ArrayList< Integer > > atomOrders
 
Map< Integer, ArrayList< Integer > > oldToNewOrder
 
Map< Integer, Map< Integer, Set< Integer > > > layers
 
int lidx
 
int scheme = 1
 

Detailed Description

Tool for re-organizing the list of atoms of an IAtomContainer

Author
Marco Foscato

Definition at line 47 of file AtomOrganizer.java.

Constructor & Destructor Documentation

◆ AtomOrganizer()

Member Function Documentation

◆ addAtomToLayer()

void denoptim.utils.AtomOrganizer.addAtomToLayer ( int  atmidx,
int  ap,
int  layer,
int  doneFlag 
)
private

Set the layer membership of an antom.

Parameters
atmidxindex of the atom.
apindex of the seed atom (starting point).
layerindex of the leyer which atmidx belongs to.
doneFlagindex of the flag reminding which atom is already done.

Definition at line 479 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.flags, and denoptim.utils.AtomOrganizer.layers.

Referenced by denoptim.utils.AtomOrganizer.layerOrientedReordering().

Here is the caller graph for this function:

◆ branchOrienterReordering()

void denoptim.utils.AtomOrganizer.branchOrienterReordering ( int  seed,
int  flag,
IAtomContainer  mol 
)
private

Reorders atoms according to the branch-oriented scheme.

Atoms connected to the seed (starting point) are listed according to the priority rules defined in ConnectedLigandComparator.

Parameters
seedindex of the first atom. The starting point.
flagindex of the flag used to specify that an atom was processed.
molmolecular object.

Definition at line 314 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.exploreMolecule(), and denoptim.utils.AtomOrganizer.processAtom().

Referenced by denoptim.utils.AtomOrganizer.reorderStartingFrom().

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

◆ deleteAtomsFlag()

void denoptim.utils.AtomOrganizer.deleteAtomsFlag ( int  flagID)
private

Destroy a vector of flags.

Parameters
flagIDthe index of the vector to be destroyed

Definition at line 592 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.flags.

Referenced by denoptim.utils.AtomOrganizer.layerOrientedReordering(), and denoptim.utils.AtomOrganizer.reorderStartingFrom().

Here is the caller graph for this function:

◆ exploreMolecule()

void denoptim.utils.AtomOrganizer.exploreMolecule ( int  seed,
int  flag,
IAtomContainer  mol,
int  ap 
)
private

Method meant for recursion on all atoms connected to a starting point.

Definition at line 329 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.exploreMolecule(), denoptim.utils.AtomOrganizer.flags, denoptim.utils.AtomOrganizer.prioritizeAtomList(), and denoptim.utils.AtomOrganizer.processAtom().

Referenced by denoptim.utils.AtomOrganizer.branchOrienterReordering(), and denoptim.utils.AtomOrganizer.exploreMolecule().

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

◆ getFreeAtomsFlag()

int denoptim.utils.AtomOrganizer.getFreeAtomsFlag ( IAtomContainer  mol)
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
molmolecular object for which the vector of flags has to be generated.
Returns
an integer index referring to the vector of flags.

Definition at line 568 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.flags.

Referenced by denoptim.utils.AtomOrganizer.layerOrientedReordering(), and denoptim.utils.AtomOrganizer.reorderStartingFrom().

Here is the caller graph for this function:

◆ getNewToOldOrder()

ArrayList< Integer > denoptim.utils.AtomOrganizer.getNewToOldOrder ( int  seed)

Returns the list of indexes that allow to map the new atom position with the old one.

Namely,

int oldAtmIdx = getNewToOldOrder().get(newAtmIdx);
Returns
the atom ordering list.

Definition at line 97 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.atomOrders.

Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree().

Here is the caller graph for this function:

◆ getOldToNewOrder()

ArrayList< Integer > denoptim.utils.AtomOrganizer.getOldToNewOrder ( int  seed)

Returns the list of indexes that allow to map the old atom position with the new one.

Namely,

int newAtmIdx = getOldToNewOrder().get(seed).get(oldAtmIdx);
Returns
the atom ordering list.

Definition at line 119 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.oldToNewOrder.

Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree().

Here is the caller graph for this function:

◆ layerOrientedReordering()

void denoptim.utils.AtomOrganizer.layerOrientedReordering ( int  seed,
int  flag,
IAtomContainer  mol 
)
private

Reorders atoms according to the layer-oriented scheme.

Atoms connected to the seed (starting point) are listed according to the distance from the seed atom (distance = number of bonds). All atoms directly connected to the seed, belong to the 1st layer; all atoms connected to the atoms of the 1st layer belong to the 2nd layer and so on. Within each layer atoms are listed according to priority rules that are defined in the ConnectedLigandComparator.

Parameters
seedindex of the first atom. The starting point.
flagindex of the flag uset to specify that an atom was processed.
molmolecular object.

Definition at line 398 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.addAtomToLayer(), denoptim.utils.AtomOrganizer.deleteAtomsFlag(), denoptim.utils.AtomOrganizer.flags, denoptim.utils.AtomOrganizer.getFreeAtomsFlag(), denoptim.utils.AtomOrganizer.layers, denoptim.utils.AtomOrganizer.lidx, denoptim.utils.AtomOrganizer.prioritizeAtomList(), and denoptim.utils.AtomOrganizer.processAtom().

Referenced by denoptim.utils.AtomOrganizer.reorderStartingFrom().

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

◆ makeReorderedCopy()

static IAtomContainer denoptim.utils.AtomOrganizer.makeReorderedCopy ( IAtomContainer  original,
List< Integer >  newToOldOrder,
List< Integer >  oldToNewOrder 
) throws DENOPTIMException
static

Produces a new container that looks very similar to the original one, but has a different atom order.

Only selected properties of the original container are projected into the new one, namely

Parameters
originalthe container to reorganize.
newToOldOrderlist of atom indexes in the original atom container. The list is supposed to work so that
oldIndex = newToOldOrder.get(newIndex);
Indexes are 0-based.
oldToNewOrderlist of atom indexes in the new atom container. The list is supposed to work so that
newIndex = oldToNewOrder.get(oldIndex);
Indexes are 0-based.
Returns
a new container that collects new atoms and new bonds that reflect the original molecule but with a different order of atoms.
Exceptions
DENOPTIMException

Definition at line 208 of file AtomOrganizer.java.

References denoptim.constants.DENOPTIMConstants.ATMPROPVERTEXID, denoptim.constants.DENOPTIMConstants.ATMPROPVERTEXPATH, denoptim.utils.MoleculeUtils.makeSameAtomAs(), denoptim.constants.DENOPTIMConstants.MOLERRORTAG, denoptim.utils.AtomOrganizer.oldToNewOrder, denoptim.constants.DENOPTIMConstants.RCAPROPAPCTORCA, denoptim.constants.DENOPTIMConstants.RCAPROPCHORDBNDTYP, and denoptim.constants.DENOPTIMConstants.RCAPROPRINGUSER.

Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.buildMulti3DStructure(), and denoptim.utils.AtomOrganizer.reorderStartingFrom().

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

◆ prioritizeAtomList()

List< IAtom > denoptim.utils.AtomOrganizer.prioritizeAtomList ( List< IAtom >  inList,
IAtomContainer  mol 
)
private

Change the order of atoms in a list according to the priority rules defined in the comparator ConnectedLigandComparator.

Parameters
inListinitial list of atoms.
molmolecular object which the atoms belongs to.
Returns
the ordered list of atoms.

Definition at line 536 of file AtomOrganizer.java.

Referenced by denoptim.utils.AtomOrganizer.exploreMolecule(), and denoptim.utils.AtomOrganizer.layerOrientedReordering().

Here is the caller graph for this function:

◆ processAtom()

void denoptim.utils.AtomOrganizer.processAtom ( int  atmidx,
int  ap,
int  doneFlag 
)
private

Perform all the operation to report an atom in the new order.

Parameters
atmidxthe index of the atom to be reported
apthe index of the seed atom (starting point) identifying the reordered list of atoms
doneFlagindex of the flag reminding which atom is already done.

Definition at line 511 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.atomOrders, denoptim.utils.AtomOrganizer.flags, and denoptim.utils.AtomOrganizer.oldToNewOrder.

Referenced by denoptim.utils.AtomOrganizer.branchOrienterReordering(), denoptim.utils.AtomOrganizer.exploreMolecule(), and denoptim.utils.AtomOrganizer.layerOrientedReordering().

Here is the caller graph for this function:

◆ reorderStartingFrom()

IAtomContainer denoptim.utils.AtomOrganizer.reorderStartingFrom ( int  seed,
IAtomContainer  mol 
) throws DENOPTIMException

Reorder the atoms in mol starting with atom seed

Parameters
seedindex of the atom being the seed of the new order
molmolecule with the original order of atoms
Returns
an IAtomContainer with the new order of atoms

Definition at line 140 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.atomOrders, denoptim.utils.AtomOrganizer.branchOrienterReordering(), denoptim.utils.AtomOrganizer.deleteAtomsFlag(), denoptim.utils.AtomOrganizer.getFreeAtomsFlag(), denoptim.utils.AtomOrganizer.layerOrientedReordering(), denoptim.utils.AtomOrganizer.makeReorderedCopy(), denoptim.utils.AtomOrganizer.oldToNewOrder, and denoptim.utils.AtomOrganizer.scheme.

Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree().

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

◆ setScheme()

void denoptim.utils.AtomOrganizer.setScheme ( int  scheme)

Definition at line 80 of file AtomOrganizer.java.

References denoptim.utils.AtomOrganizer.scheme.

Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree().

Here is the caller graph for this function:

Member Data Documentation

◆ atomOrders

Map<Integer, ArrayList<Integer> > denoptim.utils.AtomOrganizer.atomOrders
private

◆ flags

◆ layers

Map<Integer, Map<Integer, Set<Integer> > > denoptim.utils.AtomOrganizer.layers
private

◆ lidx

int denoptim.utils.AtomOrganizer.lidx
private

◆ oldToNewOrder

◆ scheme

int denoptim.utils.AtomOrganizer.scheme = 1
private

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