$darkmode
DENOPTIM
|
Tool for re-organizing the list of atoms of an IAtomContainer
More...
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 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 |
Tool for re-organizing the list of atoms of an IAtomContainer
Definition at line 47 of file AtomOrganizer.java.
denoptim.utils.AtomOrganizer.AtomOrganizer | ( | ) |
Definition at line 69 of file AtomOrganizer.java.
References denoptim.utils.AtomOrganizer.atomOrders, denoptim.utils.AtomOrganizer.flags, denoptim.utils.AtomOrganizer.layers, denoptim.utils.AtomOrganizer.lidx, and denoptim.utils.AtomOrganizer.oldToNewOrder.
|
private |
Set the layer membership of an antom.
atmidx | index of the atom. |
ap | index of the seed atom (starting point). |
layer | index of the leyer which atmidx belongs to. |
doneFlag | index 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().
|
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.
seed | index of the first atom. The starting point. |
flag | index of the flag used to specify that an atom was processed. |
mol | molecular 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().
|
private |
Destroy a vector of flags.
flagID | the 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().
|
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().
|
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
.
mol | molecular object for which the vector of flags has to be generated. |
Definition at line 568 of file AtomOrganizer.java.
References denoptim.utils.AtomOrganizer.flags.
Referenced by denoptim.utils.AtomOrganizer.layerOrientedReordering(), and denoptim.utils.AtomOrganizer.reorderStartingFrom().
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);
Definition at line 97 of file AtomOrganizer.java.
References denoptim.utils.AtomOrganizer.atomOrders.
Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree().
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);
Definition at line 119 of file AtomOrganizer.java.
References denoptim.utils.AtomOrganizer.oldToNewOrder.
Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree().
|
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.
seed | index of the first atom. The starting point. |
flag | index of the flag uset to specify that an atom was processed. |
mol | molecular 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().
|
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
DENOPTIMConstants#ATMPROPVERTEXID
DENOPTIMConstants#ATMPROPVERTEXPATH
DENOPTIMConstants#RCAPROPAPCTORCA
DENOPTIMConstants#RCAPROPCHORDBNDTYP
DENOPTIMConstants#RCAPROPRINGUSER
DENOPTIMConstants#MOLERRORTAG
original | the container to reorganize. |
newToOldOrder | list of atom indexes in the original atom container. The list is supposed to work so that oldIndex = newToOldOrder.get(newIndex);Indexes are 0-based. |
oldToNewOrder | list of atom indexes in the new atom container. The list is supposed to work so that newIndex = oldToNewOrder.get(oldIndex);Indexes are 0-based. |
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().
|
private |
Change the order of atoms in a list according to the priority rules defined in the comparator ConnectedLigandComparator.
inList | initial list of atoms. |
mol | molecular object which the atoms belongs to. |
Definition at line 536 of file AtomOrganizer.java.
Referenced by denoptim.utils.AtomOrganizer.exploreMolecule(), and denoptim.utils.AtomOrganizer.layerOrientedReordering().
|
private |
Perform all the operation to report an atom in the new order.
atmidx | the index of the atom to be reported |
ap | the index of the seed atom (starting point) identifying the reordered list of atoms |
doneFlag | index 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().
IAtomContainer denoptim.utils.AtomOrganizer.reorderStartingFrom | ( | int | seed, |
IAtomContainer | mol | ||
) | throws DENOPTIMException |
Reorder the atoms in mol starting with atom
seed
seed | index of the atom being the seed of the new order |
mol | molecule with the original order of atoms |
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().
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().
|
private |
Definition at line 56 of file AtomOrganizer.java.
Referenced by denoptim.utils.AtomOrganizer.AtomOrganizer(), denoptim.utils.AtomOrganizer.getNewToOldOrder(), denoptim.utils.AtomOrganizer.processAtom(), and denoptim.utils.AtomOrganizer.reorderStartingFrom().
|
private |
Definition at line 54 of file AtomOrganizer.java.
Referenced by denoptim.utils.AtomOrganizer.addAtomToLayer(), denoptim.utils.AtomOrganizer.AtomOrganizer(), denoptim.utils.AtomOrganizer.deleteAtomsFlag(), denoptim.utils.AtomOrganizer.exploreMolecule(), denoptim.utils.AtomOrganizer.getFreeAtomsFlag(), denoptim.utils.AtomOrganizer.layerOrientedReordering(), and denoptim.utils.AtomOrganizer.processAtom().
|
private |
Definition at line 59 of file AtomOrganizer.java.
Referenced by denoptim.utils.AtomOrganizer.addAtomToLayer(), denoptim.utils.AtomOrganizer.AtomOrganizer(), and denoptim.utils.AtomOrganizer.layerOrientedReordering().
|
private |
Definition at line 61 of file AtomOrganizer.java.
Referenced by denoptim.utils.AtomOrganizer.AtomOrganizer(), and denoptim.utils.AtomOrganizer.layerOrientedReordering().
|
private |
Definition at line 57 of file AtomOrganizer.java.
Referenced by denoptim.utils.AtomOrganizer.AtomOrganizer(), denoptim.utils.AtomOrganizer.getOldToNewOrder(), denoptim.utils.AtomOrganizer.makeReorderedCopy(), denoptim.utils.AtomOrganizer.processAtom(), and denoptim.utils.AtomOrganizer.reorderStartingFrom().
|
private |
Definition at line 65 of file AtomOrganizer.java.
Referenced by denoptim.utils.AtomOrganizer.reorderStartingFrom(), and denoptim.utils.AtomOrganizer.setScheme().