$darkmode
DENOPTIM
|
Class defining a space of building blocks. More...
Public Member Functions | |
FragmentSpace () | |
Creates an empty fragment space, which is marked as invalid. More... | |
FragmentSpace (FragmentSpaceParameters settings, String scaffFile, String fragFile, String capFile, String cpmFile) throws DENOPTIMException | |
Define all components of a fragment space that implements the attachment point class-approach. More... | |
FragmentSpace (FragmentSpaceParameters settings, ArrayList< Vertex > scaffLib, ArrayList< Vertex > fragLib, ArrayList< Vertex > cappLib, HashMap< APClass, ArrayList< APClass > > cpMap, HashMap< APClass, APClass > capMap, HashSet< APClass > forbEnds, HashMap< APClass, ArrayList< APClass > > rcCpMap) throws DENOPTIMException | |
Define all components of a fragment space that implements the attachment point class-approach. More... | |
FragmentSpace (FragmentSpaceParameters settings, ArrayList< Vertex > scaffLib, ArrayList< Vertex > fragLib, ArrayList< Vertex > cappLib, HashMap< APClass, ArrayList< APClass > > cpMap, HashMap< APClass, APClass > capMap, HashSet< APClass > forbEnds, HashMap< APClass, ArrayList< APClass > > rcCpMap, HashMap< APClass, Double > symCntrMap) throws DENOPTIMException | |
Define all components of a fragment space that implements the attachment point class-approach. More... | |
FragmentSpace (FragmentSpaceParameters settings, String scaffFile, String fragFile, String capFile, String cpmFile, String rcpmFile, HashMap< APClass, Double > symCntrMap) throws DENOPTIMException | |
Define all components of a fragment space that implements the attachment point class-approach. More... | |
boolean | isDefined () |
Checks for valid definition of this fragment space. More... | |
Randomizer | getRandomizer () |
Returns the program-specific randomizer that is associated with this program-specific fragment space. More... | |
void | setAPclassBasedApproach (boolean useAPC) |
Set the fragment space to behave according to APClass-based approach. More... | |
boolean | useAPclassBasedApproach () |
Check usage of APClass-based approach, i.e., uses attachment points with annotated data (i.e., the APClass) to evaluate compatibilities between attachment points. More... | |
APClass | getAPClassForFragment (IdFragmentAndAP apId) |
Search for a specific AP on a specific fragment and finds out its class. More... | |
Vertex | getVertexFromLibrary (Vertex.BBType bbType, int bbIdx) throws DENOPTIMException |
Returns a clone of the requested building block. More... | |
int | getCappingFragment (APClass rcnCap) |
Select a compatible capping group for the given APClass. More... | |
ArrayList< Integer > | getCompatibleCappingFragments (APClass cmpReac) |
Retrieve a list of compatible capping groups. More... | |
Vertex | makeRandomScaffold () |
Randomly select a scaffold and return a fully configured clone of it. More... | |
ArrayList< Vertex > | getScaffoldLibrary () |
ArrayList< Vertex > | getFragmentLibrary () |
ArrayList< Vertex > | getCappingLibrary () |
ArrayList< Integer > | getCappingGroupsWithAPClass (APClass capApCls) |
Vertex | getCappingVertexWithAPClass (APClass capApCls) |
void | importCompatibilityMatrixFromFile (String inFile) throws DENOPTIMException |
Load info from a compatibility matrix file. More... | |
void | importRCCompatibilityMatrixFromFile (String inFile) throws DENOPTIMException |
Load info for ring closures compatibilities from a compatibility matrix file. More... | |
HashMap< APClass, ArrayList< APClass > > | getCompatibilityMatrix () |
ArrayList< APClass > | getCompatibleAPClasses (APClass apc) |
Returns a list of APClasses compatible with the given APClass. More... | |
HashMap< APClass, ArrayList< APClass > > | getRCCompatibilityMatrix () |
Returns the compatibility matrix for ring closing fragment-fragment connections or null if not provided in the parameters file. More... | |
HashMap< APClass, APClass > | getCappingMap () |
APClass | getAPClassOfCappingVertex (APClass srcApClass) |
Set< APClass > | getForbiddenEndList () |
Set< APClass > | getAllAPClassesFromCPMap () |
Return the set of APClasses that used in the compatibility matrix for the growing graph APs. More... | |
HashMap< Integer, ArrayList< Integer > > | getMapOfFragsPerNumAps () |
ArrayList< Integer > | getFragsWithNumAps (int nAps) |
Returns the list of fragments with given number of APs. More... | |
ArrayList< APClass > | getAPClassesPerFragment (int fragId) |
Returns the APclasses associated with a given fragment. More... | |
ArrayList< IdFragmentAndAP > | getFragsWithAPClass (APClass apc) |
Returns the list of attachment points with the given class. More... | |
ArrayList< Vertex > | getVerticesWithAPClass (APClass apc) |
Returns the list of attachment points with the given class. More... | |
ArrayList< Vertex > | getFragmentsCompatibleWithTheseAPs (ArrayList< IdFragmentAndAP > srcAPs) |
Searches for all building blocks that are compatible with the given list of APs. More... | |
List< Vertex > | getRCVsWithAPClass (APClass apc) |
Searches for all building blocks that are ring-closing vertexes and hold an AP with the given class. More... | |
List< Vertex > | getRCVsForAPClass (APClass apc) |
Searches for all building blocks that are ring-closing vertexes and are compatible with the given AP. More... | |
ArrayList< AttachmentPoint > | getAPsCompatibleWithThese (ArrayList< AttachmentPoint > srcAPs) |
Searches for all attachment points that are compatible with the given list of attachment points. More... | |
ArrayList< IdFragmentAndAP > | getFragAPsCompatibleWithTheseAPs (ArrayList< IdFragmentAndAP > srcAPs) |
Searches for all APs that are compatible with the given list of APs. More... | |
ArrayList< AttachmentPoint > | getAPsCompatibleWithClass (APClass aPC1) |
Returns the list of attachment points found in the fragment space and that are compatible with a given AP class. More... | |
ArrayList< IdFragmentAndAP > | getFragAPsCompatibleWithClass (APClass aPC1) |
Returns the list of attachment points found in the fragment space and that are compatible with a given AP class. More... | |
boolean | imposeSymmetryOnAPsOfClass (APClass apClass) |
Checks if the symmetry settings impose use of symmetry on attachment points of the given AP class. More... | |
boolean | hasSymmetryConstrain (APClass apClass) |
Checks if there is a constraint on the constitutional symmetry probability for the given AP class. More... | |
double | getSymmetryConstrain (APClass apClass) |
Return the constitutional symmetry constrain for the given APclass, or null. More... | |
void | setScaffoldLibrary (ArrayList< Vertex > lib) |
void | setFragmentLibrary (ArrayList< Vertex > lib) |
void | setCappingLibrary (ArrayList< Vertex > lib) |
void | setCompatibilityMatrix (HashMap< APClass, ArrayList< APClass > > map) |
void | setRCCompatibilityMatrix (HashMap< APClass, ArrayList< APClass > > map) |
void | setCappingMap (HashMap< APClass, APClass > map) |
void | setForbiddenEndList (Set< APClass > lst) |
void | setFragPoolPerNumAP (HashMap< Integer, ArrayList< Integer > > map) |
void | setSymmConstraints (HashMap< APClass, Double > map) |
void | clearAll () |
Clears all settings of this fragment space. More... | |
void | appendVerticesToLibrary (ArrayList< Vertex > list, Vertex.BBType bbt, ArrayList< Vertex > library) |
Takes a list of vertices and add them to a given library. More... | |
void | appendVertexToLibrary (Vertex v, Vertex.BBType bbt, ArrayList< Vertex > library) |
Takes a vertex and add it to a given library. More... | |
void | addFusedRingsToFragmentLibrary (DGraph graph) |
Extracts a system of one or more fused rings and adds them to the fragment space if not already present. More... | |
void | addFusedRingsToFragmentLibrary (DGraph graph, boolean addIfScaffold, boolean addIfFragment) |
Extracts a system of one or more fused rings and adds them to the fragment space if not already present. More... | |
void | addFusedRingsToFragmentLibrary (DGraph graph, boolean addIfScaffold, boolean addIfFragment, IAtomContainer wholeMol) |
Extracts a system of one or more fused rings and adds them to the fragment space if not already present. More... | |
boolean | hasIsomorph (DGraph graph, BBType type) |
Checks if a graph is isomorphic to another template's inner graph in its appropriate fragment space library (inferred from BBType). More... | |
void | registerRCV (Vertex v) |
Adds the reference to a ring-closing vertex (RCV) to the quick-access list of RCVs known in this building block space. More... | |
ArrayList< Vertex > | getRCVs () |
Returns the list of registered ring-closing vertexes (RCVs). More... | |
List< APMapping > | mapAPClassCompatibilities (List< AttachmentPoint > listA, List< AttachmentPoint > listB, int maxCombinations) |
Given two lists of APs this method maps the APClass-compatibilities from between the two lists considering the APs in the first list the for the role of source AP in the hypothetical edge. More... | |
void | classifyFragment (Vertex frg, int fragId) |
Classify a fragment in terms of the number of APs and possibly their type (AP-Class). More... | |
void | groupAndClassifyFragments (boolean apClassBasedApproch) throws DENOPTIMException |
Performs grouping and classification operations on the library of building blocks of BBType#FRAGMENT . More... | |
Vertex | getPolarizedRCV (boolean polarity) |
Returns a newly-built vertex that can play the role of a ring-closing vertex even when working with 3D building blocks. More... | |
Private Member Functions | |
void | define (FragmentSpaceParameters settings, ArrayList< Vertex > scaffLib, ArrayList< Vertex > fragLib, ArrayList< Vertex > cappLib, HashMap< APClass, ArrayList< APClass > > cpMap, HashMap< APClass, APClass > capMap, HashSet< APClass > forbEnds, HashMap< APClass, ArrayList< APClass > > rcCpMap, HashMap< APClass, Double > symCntrMap) throws DENOPTIMException |
Define all components of this fragment space. More... | |
Private Attributes | |
ArrayList< Vertex > | scaffoldLib = null |
Data structure containing the molecular representation of building blocks: scaffolds section - fragments that can be used as seeds to grow a new molecule. More... | |
ArrayList< Vertex > | fragmentLib = null |
Data structure containing the molecular representation of building blocks: fragment section - fragments for general use. More... | |
ArrayList< Vertex > | cappingLib = null |
Data structure containing the molecular representation of building blocks: capping group section - fragments with only one attachment point used to saturate unused attachment points on a graph. More... | |
HashMap< APClass, ArrayList< APClass > > | apClassCompatibilityMatrix |
Data structure that stored the true entries of the attachment point classes compatibility matrix. More... | |
ArrayList< Vertex > | rcvs = new ArrayList<Vertex>() |
Store references to the Ring-Closing Vertexes found in the library of fragments. More... | |
HashMap< APClass, ArrayList< APClass > > | rcCompatMap |
Data structure that stores compatible APclasses for joining APs in ring-closing bonds. More... | |
HashMap< APClass, APClass > | cappingMap |
Data structure that stores the AP-classes to be used to cap unused APS on the growing molecule. More... | |
Set< APClass > | forbiddenEndList |
Data structure that stores AP classes that cannot be held unused. More... | |
HashMap< Integer, ArrayList< Integer > > | fragPoolPerNumAP |
Clusters of fragments based on the number of APs. More... | |
HashMap< Integer, ArrayList< APClass > > | apClassesPerFrag |
List of APClasses per each fragment. More... | |
HashMap< APClass, ArrayList< ArrayList< Integer > > > | fragsApsPerApClass |
Clusters of fragments'AP based on AP classes. More... | |
final Object | LOCK = new Object() |
Lock for synchronizing tasks. More... | |
HashMap< APClass, Double > | symmConstraints |
APclass-specific constraints to constitutional symmetry. More... | |
boolean | apClassBasedApproch = false |
Flag defining use of AP class-based approach. More... | |
boolean | isValid = false |
Flag signaling that this fragment space was built and validated. More... | |
FragmentSpaceParameters | settings = null |
Settings used to configure this fragment space. More... | |
Class defining a space of building blocks.
The space comprises of the lists of building blocks and the rules governing the connection of building blocks to forms a DGraph
.
Definition at line 66 of file FragmentSpace.java.
denoptim.fragspace.FragmentSpace.FragmentSpace | ( | ) |
Creates an empty fragment space, which is marked as invalid.
Such fragment space has very limited functionality, but can be used to manipulate information related to fragment spaces, such as, handling compatibility rules even without having any defined vertex in it.
Definition at line 174 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingLib, denoptim.fragspace.FragmentSpace.fragmentLib, denoptim.fragspace.FragmentSpace.scaffoldLib, and denoptim.fragspace.FragmentSpace.settings.
denoptim.fragspace.FragmentSpace.FragmentSpace | ( | FragmentSpaceParameters | settings, |
String | scaffFile, | ||
String | fragFile, | ||
String | capFile, | ||
String | cpmFile | ||
) | throws DENOPTIMException |
Define all components of a fragment space that implements the attachment point class-approach.
scaffFile | pathname to library of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds). |
fragFile | pathname to the library of fragments for general purpose. |
capFile | pathname to the library of single-AP fragments used to cap free attachment points (i.e., the capping groups). |
cpmFile | pathname to the compatibility matrix, bond type mapping, capping, and forbidden ends rules. |
DENOPTIMException |
Definition at line 199 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.settings.
denoptim.fragspace.FragmentSpace.FragmentSpace | ( | FragmentSpaceParameters | settings, |
ArrayList< Vertex > | scaffLib, | ||
ArrayList< Vertex > | fragLib, | ||
ArrayList< Vertex > | cappLib, | ||
HashMap< APClass, ArrayList< APClass > > | cpMap, | ||
HashMap< APClass, APClass > | capMap, | ||
HashSet< APClass > | forbEnds, | ||
HashMap< APClass, ArrayList< APClass > > | rcCpMap | ||
) | throws DENOPTIMException |
Define all components of a fragment space that implements the attachment point class-approach.
scaffLib | library of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds). |
fragLib | library of fragments for general purpose. |
cappLib | library of single-AP fragments used to cap free attachment points (i.e., the capping groups). |
cpMap | the APClass compatibility map. This data structure is a map of the APClass-on-growing-graph (key) to list of permitted APClasses on incoming fragment (values). |
capMap | the capping rules. This data structure is a map of APClass-to-cap (keys) to APClass-of-capping-group (values). |
forbEnds | the list of forbidden ends, i.e., APClasses that cannot be left unused neither capped. |
rcCpMap | the APClass compatibility matrix for ring closures. |
DENOPTIMException |
Definition at line 230 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.settings.
denoptim.fragspace.FragmentSpace.FragmentSpace | ( | FragmentSpaceParameters | settings, |
ArrayList< Vertex > | scaffLib, | ||
ArrayList< Vertex > | fragLib, | ||
ArrayList< Vertex > | cappLib, | ||
HashMap< APClass, ArrayList< APClass > > | cpMap, | ||
HashMap< APClass, APClass > | capMap, | ||
HashSet< APClass > | forbEnds, | ||
HashMap< APClass, ArrayList< APClass > > | rcCpMap, | ||
HashMap< APClass, Double > | symCntrMap | ||
) | throws DENOPTIMException |
Define all components of a fragment space that implements the attachment point class-approach.
scaffLib | library of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds). |
fragLib | library of fragments for general purpose. |
cappLib | library of single-AP fragments used to cap free attachment points (i.e., the capping groups). |
cpMap | the APClass compatibility map. This data structure is a map of the APClass-on-growing-graph (key) to list of permitted APClasses on incoming fragment (values). |
capMap | the capping rules. This data structure is a map of APClass-to-cap (keys) to APClass-of-capping-group (values). |
forbEnds | the list of forbidden ends, i.e., APClasses that cannot be left unused neither capped. |
rcCpMap | the APClass compatibility matrix for ring closures. |
symCntrMap | map of symmetry probability constraints. |
DENOPTIMException |
Definition at line 268 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.settings.
denoptim.fragspace.FragmentSpace.FragmentSpace | ( | FragmentSpaceParameters | settings, |
String | scaffFile, | ||
String | fragFile, | ||
String | capFile, | ||
String | cpmFile, | ||
String | rcpmFile, | ||
HashMap< APClass, Double > | symCntrMap | ||
) | throws DENOPTIMException |
Define all components of a fragment space that implements the attachment point class-approach.
scaffFile | pathname to library of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds). Can be null or empty in which case no scaffold is imported. |
fragFile | pathname to the library of fragments for general purpose. Can be null or empty in which case no fragment is imported. |
capFile | pathname to the library of single-AP fragments used to cap free attachment points (i.e., the capping groups). |
cpmFile | pathname to the compatibility matrix, capping, and forbidden ends rules. |
rcpmFile | the APClass compatibility matrix for ring closures. |
symCntrMap | map of symmetry probability constraints. |
DENOPTIMException |
Definition at line 304 of file FragmentSpace.java.
References denoptim.graph.Vertex.BBType.CAP, denoptim.fragspace.FragmentSpace.define(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.io.DenoptimIO.readCompatibilityMatrix(), denoptim.io.DenoptimIO.readRCCompatibilityMatrix(), denoptim.io.DenoptimIO.readVertexes(), denoptim.graph.Vertex.BBType.SCAFFOLD, and denoptim.fragspace.FragmentSpace.settings.
void denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary | ( | DGraph | graph | ) |
Extracts a system of one or more fused rings and adds them to the fragment space if not already present.
This method does not create any molecular geometry in the building block that is stores in the library. See FragmentSpace#addFusedRingsToFragmentLibrary(DGraph, boolean, boolean, IAtomContainer)
to include a molecular representation on the stored building block. WARNING Expanding the libraries of building blocks on-the-fly has the potential to overload the memory.
Definition at line 1526 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary().
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToScaffoldLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingOnlyAddedOnce(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary | ( | DGraph | graph, |
boolean | addIfScaffold, | ||
boolean | addIfFragment | ||
) |
Extracts a system of one or more fused rings and adds them to the fragment space if not already present.
WARNING Expanding the libraries of building blocks on-the-fly has the potential to overload the memory.
graph | the graph to analyze and possibly chop. |
addIfScaffold | use true to enable saving of new ring systems that contain any scaffold vertexes as new scaffolds. |
addIfFragment | use true to enable saving of new ring systems that do NOT contain any scaffold vertexes as new fragments. |
Definition at line 1545 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary().
void denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary | ( | DGraph | graph, |
boolean | addIfScaffold, | ||
boolean | addIfFragment, | ||
IAtomContainer | wholeMol | ||
) |
Extracts a system of one or more fused rings and adds them to the fragment space if not already present.
WARNING Expanding the libraries of building blocks on-the-fly has the potential to overload the memory.
graph | the graph to analyze and possibly chop. |
addIfScaffold | use true to enable saving of new ring systems that contain any scaffold vertexes as new scaffolds. |
addIfFragment | use true to enable saving of new ring systems that do NOT contain any scaffold vertexes as new fragments. |
wholeMol | the complete molecular representation of graph . If this parameter is not null, then we'll try to use the geometry found in this parameter to define the geometry of the fused-rings templates. The atoms in this container are expected to have property DENOPTIMConstants#ATMPROPVERTEXID that defines the ID of the vertex from which each atom comes from. |
Definition at line 1578 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.appendVertexToLibrary(), denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.graph.DGraph.extractPattern(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.fragspace.FragmentSpace.fragmentLib, denoptim.graph.DGraph.getCandidateOwner(), denoptim.graph.DGraph.getGraphId(), denoptim.graph.Template.getInnerGraph(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.graph.Candidate.getName(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedFragments(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedScaffolds(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.fragspace.FragmentSpace.hasIsomorph(), denoptim.fragspace.FragmentSpace.LOCK, denoptim.graph.GraphPattern.RING, denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.fragspace.FragmentSpace.scaffoldLib, denoptim.graph.Template.setIAtomContainer(), denoptim.graph.Template.setInnerGraph(), denoptim.fragspace.FragmentSpace.settings, denoptim.io.DenoptimIO.writeGraphsToJSON(), denoptim.io.DenoptimIO.writeGraphToSDF(), and denoptim.io.DenoptimIO.writeSDFFile().
void denoptim.fragspace.FragmentSpace.appendVertexToLibrary | ( | Vertex | v, |
Vertex.BBType | bbt, | ||
ArrayList< Vertex > | library | ||
) |
Takes a vertex and add it to a given library.
Each vertex is assigned the building block type and ID.
v | vertex to import. |
bbt | the type of building block the vertex should be set to. |
library | where to import the vertex to. |
Definition at line 1498 of file FragmentSpace.java.
References denoptim.graph.Vertex.setBuildingBlockId(), and denoptim.graph.Vertex.setBuildingBlockType().
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpace.appendVerticesToLibrary(), denoptim.fragspace.GraphLinkFinderTest.prepare(), denoptim.ga.EAUtilsTest.prepare(), denoptim.graph.DGraphTest.prepare(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.fragspace.FragmentSpace.appendVerticesToLibrary | ( | ArrayList< Vertex > | list, |
Vertex.BBType | bbt, | ||
ArrayList< Vertex > | library | ||
) |
Takes a list of vertices and add them to a given library.
Each vertex is assigned the building block type and ID.
list | of vertices to import. |
bbt | the type of building block the vertices should be set to. |
library | where to import the vertices to. |
Definition at line 1478 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.appendVertexToLibrary().
Referenced by denoptim.fragspace.FragmentSpace.setCappingLibrary(), denoptim.fragspace.FragmentSpace.setFragmentLibrary(), and denoptim.fragspace.FragmentSpace.setScaffoldLibrary().
void denoptim.fragspace.FragmentSpace.classifyFragment | ( | Vertex | frg, |
int | fragId | ||
) |
Classify a fragment in terms of the number of APs and possibly their type (AP-Class).
frg | the building block to classify |
id | the index of the fragment in the library |
DENOPTIMException |
Definition at line 1824 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassesPerFrag, denoptim.fragspace.FragmentSpace.fragsApsPerApClass, denoptim.graph.Vertex.getAllAPClasses(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.Vertex.getAttachmentPoints(), denoptim.fragspace.FragmentSpace.getFragsWithNumAps(), denoptim.graph.Vertex.getFreeAPCount(), denoptim.fragspace.FragmentSpace.getMapOfFragsPerNumAps(), denoptim.graph.AttachmentPoint.isAvailable(), denoptim.graph.Vertex.isRCV, denoptim.fragspace.FragmentSpace.LOCK, denoptim.fragspace.FragmentSpace.registerRCV(), and denoptim.fragspace.FragmentSpace.useAPclassBasedApproach().
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), and denoptim.fragspace.FragmentSpace.groupAndClassifyFragments().
void denoptim.fragspace.FragmentSpace.clearAll | ( | ) |
Clears all settings of this fragment space.
All fields changed to null
.
Definition at line 1451 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix, denoptim.fragspace.FragmentSpace.apClassesPerFrag, denoptim.fragspace.FragmentSpace.cappingLib, denoptim.fragspace.FragmentSpace.cappingMap, denoptim.fragspace.FragmentSpace.forbiddenEndList, denoptim.fragspace.FragmentSpace.fragmentLib, denoptim.fragspace.FragmentSpace.fragPoolPerNumAP, denoptim.fragspace.FragmentSpace.fragsApsPerApClass, denoptim.fragspace.FragmentSpace.isValid, denoptim.fragspace.FragmentSpace.rcCompatMap, denoptim.fragspace.FragmentSpace.scaffoldLib, and denoptim.fragspace.FragmentSpace.symmConstraints.
|
private |
Define all components of this fragment space.
scaffLib | library of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds). |
fragLib | library of fragments for general purpose. |
cappLib | library of single-AP fragments used to cap free attachment points (i.e., the capping groups). |
cpMap | the APClass compatibility map. This data structure is a map of the APClass-on-growing-graph (key) to list of permitted APClasses on incoming fragment (values). |
capMap | the capping rules. This data structure is a map of APClass-to-cap (keys) to APClass-of-capping-group (values). |
forbEnds | the list of forbidden ends, i.e., APClasses that cannot be left unused neither capped. |
rcCpMap | the APClass compatibility matrix for ring closures. |
symCntrMap | map of symmetry probability constraints. |
DENOPTIMException |
Definition at line 409 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassBasedApproch, denoptim.fragspace.FragmentSpace.groupAndClassifyFragments(), denoptim.fragspace.FragmentSpace.isValid, denoptim.fragspace.FragmentSpace.setCappingLibrary(), denoptim.fragspace.FragmentSpace.setCappingMap(), denoptim.fragspace.FragmentSpace.setCompatibilityMatrix(), denoptim.fragspace.FragmentSpace.setForbiddenEndList(), denoptim.fragspace.FragmentSpace.setFragmentLibrary(), denoptim.fragspace.FragmentSpaceParameters.setFragmentSpace(), denoptim.fragspace.FragmentSpace.setRCCompatibilityMatrix(), denoptim.fragspace.FragmentSpace.setScaffoldLibrary(), denoptim.fragspace.FragmentSpace.setSymmConstraints(), and denoptim.fragspace.FragmentSpace.settings.
Referenced by denoptim.fragspace.FragmentSpace.FragmentSpace().
Set< APClass > denoptim.fragspace.FragmentSpace.getAllAPClassesFromCPMap | ( | ) |
Return the set of APClasses that used in the compatibility matrix for the growing graph APs.
Note these APClasses do include subclasses. For example, for AP with class MyAPClass:0
the 0
is the subclass.
Definition at line 908 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix.
Referenced by denoptim.gui.FSParametersForm.FSParametersForm().
ArrayList< APClass > denoptim.fragspace.FragmentSpace.getAPClassesPerFragment | ( | int | fragId | ) |
Returns the APclasses associated with a given fragment.
fragId | the index of the fragment in the library |
Definition at line 948 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassesPerFrag, and denoptim.fragspace.FragmentSpace.LOCK.
APClass denoptim.fragspace.FragmentSpace.getAPClassForFragment | ( | IdFragmentAndAP | apId | ) |
Search for a specific AP on a specific fragment and finds out its class.
apId | the identified of a specific attachment point. |
Definition at line 495 of file FragmentSpace.java.
References denoptim.fragspace.IdFragmentAndAP.getApId(), denoptim.graph.Vertex.getAttachmentPoints(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), denoptim.fragspace.IdFragmentAndAP.getVertexMolId(), and denoptim.fragspace.IdFragmentAndAP.getVertexMolType().
Referenced by denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithTheseAPs().
srcApClass | the attachment point class of the attachment point to be capped |
Definition at line 885 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingMap.
Referenced by denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), and denoptim.graph.DGraph.graphNeedsCappingGroups().
ArrayList< AttachmentPoint > denoptim.fragspace.FragmentSpace.getAPsCompatibleWithClass | ( | APClass | aPC1 | ) |
Returns the list of attachment points found in the fragment space and that are compatible with a given AP class.
Multiple APs can be found for each fragment.
aPC1 | the AP class for which we want compatible APs. |
Definition at line 1244 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.getCompatibleAPClasses(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.fragspace.FragmentSpace.getVerticesWithAPClass(), and denoptim.fragspace.FragmentSpace.settings.
Referenced by denoptim.fragspace.FragmentSpace.getAPsCompatibleWithThese().
ArrayList< AttachmentPoint > denoptim.fragspace.FragmentSpace.getAPsCompatibleWithThese | ( | ArrayList< AttachmentPoint > | srcAPs | ) |
Searches for all attachment points that are compatible with the given list of attachment points.
srcAPs | attachment points meant to results have to be compatible with. |
Definition at line 1140 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.getAPsCompatibleWithClass().
Referenced by denoptim.gui.GUIGraphHandler.collectFragAndAPsCompatibleWithSelectedAPs().
int denoptim.fragspace.FragmentSpace.getCappingFragment | ( | APClass | rcnCap | ) |
Select a compatible capping group for the given APClass.
rcnCap | the class of the attachment point to be capped. |
Definition at line 663 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.getCompatibleCappingFragments(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.utils.Randomizer.randomlyChooseOne(), and denoptim.fragspace.FragmentSpace.settings.
ArrayList< Integer > denoptim.fragspace.FragmentSpace.getCappingGroupsWithAPClass | ( | APClass | capApCls | ) |
capApCls | the APClass of the attachment point on the capping group |
APClass
. Definition at line 752 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingLib, and denoptim.graph.APClass.equals().
Referenced by denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator().
ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getCappingLibrary | ( | ) |
Definition at line 740 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingLib.
Referenced by denoptim.gui.GUIGraphHandler.extendGraphFromFragSpace(), denoptim.fragspace.FragmentSpace.getCompatibleCappingFragments(), and denoptim.graph.DGraphTest.prepare().
Definition at line 872 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingMap.
Referenced by denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), and denoptim.ga.EAUtils.buildCandidatesByXOver().
capApCls | the APClass of the attachment point on the capping group. |
APClass
, or null
if none was found. Definition at line 775 of file FragmentSpace.java.
References denoptim.graph.Vertex.BBType.CAP, denoptim.fragspace.FragmentSpace.cappingLib, denoptim.graph.APClass.equals(), and denoptim.fragspace.FragmentSpace.getVertexFromLibrary().
HashMap< APClass, ArrayList< APClass > > denoptim.fragspace.FragmentSpace.getCompatibilityMatrix | ( | ) |
Definition at line 834 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix.
Referenced by denoptim.fragspace.FragmentSpace.getRCVsForAPClass().
Returns a list of APClasses compatible with the given APClass.
The compatibility among classes is defined by the compatibility matrix
apc |
Definition at line 847 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix.
Referenced by denoptim.fragspace.FragmentSpace.getAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithClass(), and denoptim.graph.APClass.isCPMapCompatibleWith().
ArrayList< Integer > denoptim.fragspace.FragmentSpace.getCompatibleCappingFragments | ( | APClass | cmpReac | ) |
Retrieve a list of compatible capping groups.
cmpReac |
Definition at line 687 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingLib, denoptim.graph.Vertex.getAllAPClasses(), and denoptim.fragspace.FragmentSpace.getCappingLibrary().
Referenced by denoptim.fragspace.FragmentSpace.getCappingFragment().
Set< APClass > denoptim.fragspace.FragmentSpace.getForbiddenEndList | ( | ) |
Definition at line 892 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.forbiddenEndList.
Referenced by denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.foundForbiddenEnd(), denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), and denoptim.graph.DGraph.hasForbiddenEnd().
ArrayList< IdFragmentAndAP > denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithClass | ( | APClass | aPC1 | ) |
Returns the list of attachment points found in the fragment space and that are compatible with a given AP class.
Multiple APs can be found for each fragment.
aPC1 | the AP class for which we want compatible APs. |
Definition at line 1291 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.getCompatibleAPClasses(), and denoptim.fragspace.FragmentSpace.getFragsWithAPClass().
Referenced by denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithTheseAPs(), and denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass().
ArrayList< IdFragmentAndAP > denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithTheseAPs | ( | ArrayList< IdFragmentAndAP > | srcAPs | ) |
Searches for all APs that are compatible with the given list of APs.
srcAPs | the identifiers of APs meant to hold any of the desired fragments. |
Definition at line 1191 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.getAPClassForFragment(), and denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithClass().
Referenced by denoptim.fragspace.FragmentSpace.getFragmentsCompatibleWithTheseAPs(), and denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs().
ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getFragmentLibrary | ( | ) |
Definition at line 733 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.fragmentLib.
Referenced by denoptim.gui.GUIGraphHandler.extendGraphFromFragSpace(), denoptim.fragspace.GraphLinkFinder.getCandidateBBs(), denoptim.fragspace.FragmentSpace.groupAndClassifyFragments(), denoptim.fragspace.GraphLinkFinderTest.prepare(), denoptim.ga.EAUtilsTest.prepare(), denoptim.graph.DGraphTest.prepare(), denoptim.gui.GUIGraphHandler.startGraphFromFragSpaceOrCreationOfEmptyVertex(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingOnlyAddedOnce(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getFragmentsCompatibleWithTheseAPs | ( | ArrayList< IdFragmentAndAP > | srcAPs | ) |
Searches for all building blocks that are compatible with the given list of APs.
srcAPs | the identifiers of APs meant to hold any of the desired fragments. |
Definition at line 1026 of file FragmentSpace.java.
References denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithTheseAPs(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), and denoptim.fragspace.FragmentSpace.settings.
Referenced by denoptim.fragspace.FragmentSpaceTest.testGetFragmentsCompatibleWithTheseAPs().
ArrayList< IdFragmentAndAP > denoptim.fragspace.FragmentSpace.getFragsWithAPClass | ( | APClass | apc | ) |
Returns the list of attachment points with the given class.
The returned identifiers have vertex_id
=-1 because these APs are only on the individual fragments held in the library and do not belong to any graph.
apc |
Definition at line 968 of file FragmentSpace.java.
References denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.fragspace.FragmentSpace.fragsApsPerApClass, and denoptim.fragspace.FragmentSpace.LOCK.
Referenced by denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithClass(), and denoptim.fragspace.FragmentSpaceTest.testGetFragsWithAPClass().
ArrayList< Integer > denoptim.fragspace.FragmentSpace.getFragsWithNumAps | ( | int | nAps | ) |
Returns the list of fragments with given number of APs.
nAps | the number of attachment points |
Definition at line 929 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.fragPoolPerNumAP.
Referenced by denoptim.fragspace.FragmentSpace.classifyFragment().
HashMap< Integer, ArrayList< Integer > > denoptim.fragspace.FragmentSpace.getMapOfFragsPerNumAps | ( | ) |
Definition at line 915 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.fragPoolPerNumAP.
Referenced by denoptim.fragspace.FragmentSpace.classifyFragment().
Vertex denoptim.fragspace.FragmentSpace.getPolarizedRCV | ( | boolean | polarity | ) |
Returns a newly-built vertex that can play the role of a ring-closing vertex even when working with 3D building blocks.
polarity | use true to get an RCV with attachment point class APClass#ATPLUSS and false to get APClass#ATMINUS . |
Definition at line 1927 of file FragmentSpace.java.
References denoptim.graph.Fragment.addAP(), denoptim.graph.Fragment.addAtom(), denoptim.graph.APClass.RCACLASSMINUS, denoptim.graph.APClass.RCACLASSPLUS, denoptim.graph.rings.RingClosingAttractor.RCALABELPERAPCLASS, and denoptim.graph.Vertex.setAsRCV().
Randomizer denoptim.fragspace.FragmentSpace.getRandomizer | ( | ) |
Returns the program-specific randomizer that is associated with this program-specific fragment space.
Definition at line 456 of file FragmentSpace.java.
References denoptim.programs.RunTimeParameters.getRandomizer(), and denoptim.fragspace.FragmentSpace.settings.
Referenced by denoptim.fragspace.APMapFinder.findAllMappings().
HashMap< APClass, ArrayList< APClass > > denoptim.fragspace.FragmentSpace.getRCCompatibilityMatrix | ( | ) |
Returns the compatibility matrix for ring closing fragment-fragment connections or null
if not provided in the parameters file.
Definition at line 865 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.rcCompatMap.
Referenced by denoptim.graph.rings.RingSizeManager.evaluateRCVPair().
ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getRCVs | ( | ) |
Returns the list of registered ring-closing vertexes (RCVs).
Definition at line 1741 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.rcvs.
Referenced by denoptim.fragspace.FragmentSpace.getRCVsForAPClass(), and denoptim.fragspace.FragmentSpace.getRCVsWithAPClass().
Searches for all building blocks that are ring-closing vertexes and are compatible with the given AP.
apc | the class of the attachment point meant to hold the RCV. |
Definition at line 1100 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.getCompatibilityMatrix(), denoptim.fragspace.FragmentSpace.getRCVs(), and denoptim.fragspace.FragmentSpace.getVertexFromLibrary().
Referenced by denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass().
Searches for all building blocks that are ring-closing vertexes and hold an AP with the given class.
apc | the desired class of the attachment point. |
Definition at line 1065 of file FragmentSpace.java.
References denoptim.graph.APClass.equals(), denoptim.fragspace.FragmentSpace.getRCVs(), and denoptim.fragspace.FragmentSpace.getVertexFromLibrary().
Referenced by denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass().
ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getScaffoldLibrary | ( | ) |
Definition at line 726 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.scaffoldLib.
Referenced by denoptim.fragspace.GraphLinkFinder.getCandidateBBs(), denoptim.fragspace.GraphLinkFinderTest.prepare(), denoptim.ga.EAUtilsTest.prepare(), denoptim.graph.DGraphTest.prepare(), denoptim.gui.GUIGraphHandler.startGraphFromFragSpaceOrCreationOfEmptyVertex(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToScaffoldLibrary(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
double denoptim.fragspace.FragmentSpace.getSymmetryConstrain | ( | APClass | apClass | ) |
Return the constitutional symmetry constrain for the given APclass, or null.
The constrain is a fixed probability that is not dependent on the distance from the root of the DENOPTIMGraph (i.e. the level).
apClass | the attachment point class |
Definition at line 1374 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.symmConstraints.
Referenced by denoptim.fragspace.FragmentSpace.imposeSymmetryOnAPsOfClass().
Vertex denoptim.fragspace.FragmentSpace.getVertexFromLibrary | ( | Vertex.BBType | bbType, |
int | bbIdx | ||
) | throws DENOPTIMException |
Returns a clone of the requested building block.
The type of vertex returned depends on the type stored in the library.
bbType | the type of building block. This basically selects the sub library from which the building block is taken: 0 for scaffold (i.e., building blocks that can be used to start a new graph), 1 for standard building blocks (i.e., can be used freely to grow or modify an existing graph), or 2 for capping group (i.e., can be used only to saturate attachment points that cannot remain unused in a finished graph). |
bbIdx | the index (0-based) of the building block in the corresponding library defied by the type of building block 'bbType' |
DENOPTIMException | when the given indexes cannot be used, for example, any of the indexes is out of range. |
Definition at line 532 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingLib, denoptim.graph.Vertex.clone(), denoptim.fragspace.FragmentSpace.fragmentLib, denoptim.graph.Vertex.getBuildingBlockId(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.utils.GraphUtils.getUniqueVertexIndex(), denoptim.fragspace.FragmentSpace.scaffoldLib, denoptim.graph.Vertex.setBuildingBlockId(), denoptim.fragspace.FragmentSpace.settings, and denoptim.graph.Vertex.setVertexId().
Referenced by denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), denoptim.fragspace.FragmentSpace.getAPClassForFragment(), denoptim.fragspace.GraphLinkFinder.getCandidateBBs(), denoptim.fragspace.FragmentSpace.getCappingVertexWithAPClass(), denoptim.fragspace.FragmentSpace.getFragmentsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpace.getRCVsForAPClass(), denoptim.fragspace.FragmentSpace.getRCVsWithAPClass(), denoptim.fragspace.GraphLinkFinder.GraphLinkFinder(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphA(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphE(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphF(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
Returns the list of attachment points with the given class.
apc | the attachment point class to search. |
Definition at line 998 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.fragmentLib, denoptim.fragspace.FragmentSpace.fragsApsPerApClass, and denoptim.fragspace.FragmentSpace.LOCK.
Referenced by denoptim.fragspace.FragmentSpace.getAPsCompatibleWithClass().
void denoptim.fragspace.FragmentSpace.groupAndClassifyFragments | ( | boolean | apClassBasedApproch | ) | throws DENOPTIMException |
Performs grouping and classification operations on the library of building blocks of BBType#FRAGMENT
.
apClassBasedApproch | true if you are using class based approach |
Definition at line 1894 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassBasedApproch, denoptim.fragspace.FragmentSpace.apClassesPerFrag, denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.fragspace.FragmentSpace.fragsApsPerApClass, denoptim.fragspace.FragmentSpace.getFragmentLibrary(), denoptim.fragspace.FragmentSpace.LOCK, and denoptim.fragspace.FragmentSpace.setFragPoolPerNumAP().
Referenced by denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.GraphLinkFinderTest.prepare().
Checks if a graph is isomorphic to another template's inner graph in its appropriate fragment space library (inferred from BBType).
graph | to check if has an isomorph in the fragment space. |
type | specifying which fragment library to check for isomorphs in. |
Definition at line 1714 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.fragmentLib, denoptim.graph.Template.getInnerGraph(), denoptim.graph.Vertex.BBType.SCAFFOLD, and denoptim.fragspace.FragmentSpace.scaffoldLib.
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary().
boolean denoptim.fragspace.FragmentSpace.hasSymmetryConstrain | ( | APClass | apClass | ) |
Checks if there is a constraint on the constitutional symmetry probability for the given AP class.
apClass | the attachment point class |
true if there is a constraint on the constitutional symmetry probability for the given AP class.
Definition at line 1355 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.symmConstraints.
Referenced by denoptim.fragspace.FragmentSpace.imposeSymmetryOnAPsOfClass().
void denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile | ( | String | inFile | ) | throws DENOPTIMException |
Load info from a compatibility matrix file.
This method imports information such as the compatibility matrix, bond order map, and forbidden ends from a compatibility matrix file (i.e., a formatted text file using DENOPTIM keyword. This overrides any previous setting of such information in this FragmentSpace.
inFile | the pathname of the compatibility matrix file |
Definition at line 806 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix, denoptim.fragspace.FragmentSpace.cappingMap, denoptim.fragspace.FragmentSpace.forbiddenEndList, denoptim.io.DenoptimIO.readCompatibilityMatrix(), denoptim.fragspace.FragmentSpace.setCappingMap(), denoptim.fragspace.FragmentSpace.setCompatibilityMatrix(), and denoptim.fragspace.FragmentSpace.setForbiddenEndList().
Referenced by denoptim.gui.FSParametersForm.FSParametersForm().
void denoptim.fragspace.FragmentSpace.importRCCompatibilityMatrixFromFile | ( | String | inFile | ) | throws DENOPTIMException |
Load info for ring closures compatibilities from a compatibility matrix file.
inFile | the pathname of the RC-compatibility matrix file |
Definition at line 825 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.rcCompatMap, denoptim.io.DenoptimIO.readRCCompatibilityMatrix(), and denoptim.fragspace.FragmentSpace.setRCCompatibilityMatrix().
boolean denoptim.fragspace.FragmentSpace.imposeSymmetryOnAPsOfClass | ( | APClass | apClass | ) |
Checks if the symmetry settings impose use of symmetry on attachment points of the given AP class.
The value returned is the result of the action of symmetry-related keyword affecting the definition of this FragmentSpace.
apClass | the attachment point class |
true if symmetry has the applied on APs of the given class
Definition at line 1324 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpaceParameters.enforceSymmetry, denoptim.constants.DENOPTIMConstants.FLOATCOMPARISONTOLERANCE, denoptim.fragspace.FragmentSpace.getSymmetryConstrain(), denoptim.fragspace.FragmentSpace.hasSymmetryConstrain(), and denoptim.fragspace.FragmentSpace.settings.
Referenced by denoptim.ga.GraphOperations.attachFragmentInClosableChain(), denoptim.ga.GraphOperations.extendGraph(), denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), and denoptim.fragspace.FragsCombinationIterator.next().
boolean denoptim.fragspace.FragmentSpace.isDefined | ( | ) |
Checks for valid definition of this fragment space.
true
if this fragment space has been defined Definition at line 444 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.isValid.
Referenced by denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragmentsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragsWithAPClass(), and denoptim.fragspace.FragmentSpaceTest.testSymmetry().
Vertex denoptim.fragspace.FragmentSpace.makeRandomScaffold | ( | ) |
Randomly select a scaffold and return a fully configured clone of it.
DENOPTIMException |
Definition at line 708 of file FragmentSpace.java.
References denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.utils.GraphUtils.getUniqueVertexIndex(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.utils.Randomizer.nextInt(), denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.fragspace.FragmentSpace.scaffoldLib, and denoptim.fragspace.FragmentSpace.settings.
Referenced by denoptim.ga.EAUtils.buildGraph().
List< APMapping > denoptim.fragspace.FragmentSpace.mapAPClassCompatibilities | ( | List< AttachmentPoint > | listA, |
List< AttachmentPoint > | listB, | ||
int | maxCombinations | ||
) |
Given two lists of APs this method maps the APClass-compatibilities from between the two lists considering the APs in the first list the for the role of source AP in the hypothetical edge.
listA | list of candidate source APs |
listB | list of candidate target APs |
maxCombinations | a maximum limit; if reached we are happy we give up finding more combination. |
Definition at line 1758 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpaceUtils.recursiveCombiner(), and denoptim.fragspace.FragmentSpace.useAPclassBasedApproach().
void denoptim.fragspace.FragmentSpace.registerRCV | ( | Vertex | v | ) |
Adds the reference to a ring-closing vertex (RCV) to the quick-access list of RCVs known in this building block space.
v | the RCV to add to the list. |
Definition at line 1730 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.rcvs.
Referenced by denoptim.fragspace.FragmentSpace.classifyFragment().
void denoptim.fragspace.FragmentSpace.setAPclassBasedApproach | ( | boolean | useAPC | ) |
Set the fragment space to behave according to APClass-based approach.
Definition at line 466 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassBasedApproch.
Referenced by denoptim.fragspace.APMapFinderTest.prepare(), denoptim.fragspace.GraphLinkFinderTest.prepare(), denoptim.ga.EAUtilsTest.prepare(), denoptim.ga.GraphOperationsTest.prepare(), denoptim.ga.PopulationTest.prepare(), denoptim.graph.DGraphTest.prepare(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.rings.RandomCombOfRingIteratorTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.fragspace.APMapFinderTest.testFindMappingCompatibileAPs(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass(), and denoptim.graph.DGraphTest.testRemoveUnusedRCVs().
void denoptim.fragspace.FragmentSpace.setCappingLibrary | ( | ArrayList< Vertex > | lib | ) |
Definition at line 1395 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.appendVerticesToLibrary(), denoptim.graph.Vertex.BBType.CAP, and denoptim.fragspace.FragmentSpace.cappingLib.
Referenced by denoptim.fragspace.FragmentSpace.define().
Definition at line 1418 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.cappingMap.
Referenced by denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile().
void denoptim.fragspace.FragmentSpace.setCompatibilityMatrix | ( | HashMap< APClass, ArrayList< APClass > > | map | ) |
Definition at line 1403 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix.
Referenced by denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile().
void denoptim.fragspace.FragmentSpace.setForbiddenEndList | ( | Set< APClass > | lst | ) |
Definition at line 1425 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.forbiddenEndList.
Referenced by denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile().
void denoptim.fragspace.FragmentSpace.setFragmentLibrary | ( | ArrayList< Vertex > | lib | ) |
Definition at line 1387 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.appendVerticesToLibrary(), denoptim.graph.Vertex.BBType.FRAGMENT, and denoptim.fragspace.FragmentSpace.fragmentLib.
Referenced by denoptim.fragspace.FragmentSpace.define().
void denoptim.fragspace.FragmentSpace.setFragPoolPerNumAP | ( | HashMap< Integer, ArrayList< Integer > > | map | ) |
Definition at line 1432 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.fragPoolPerNumAP.
Referenced by denoptim.fragspace.FragmentSpace.groupAndClassifyFragments().
void denoptim.fragspace.FragmentSpace.setRCCompatibilityMatrix | ( | HashMap< APClass, ArrayList< APClass > > | map | ) |
Definition at line 1410 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.rcCompatMap.
Referenced by denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.importRCCompatibilityMatrixFromFile().
void denoptim.fragspace.FragmentSpace.setScaffoldLibrary | ( | ArrayList< Vertex > | lib | ) |
Definition at line 1381 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.appendVerticesToLibrary(), denoptim.graph.Vertex.BBType.SCAFFOLD, and denoptim.fragspace.FragmentSpace.scaffoldLib.
Referenced by denoptim.fragspace.FragmentSpace.define().
void denoptim.fragspace.FragmentSpace.setSymmConstraints | ( | HashMap< APClass, Double > | map | ) |
Definition at line 1440 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.symmConstraints.
Referenced by denoptim.fragspace.FragmentSpace.define().
boolean denoptim.fragspace.FragmentSpace.useAPclassBasedApproach | ( | ) |
Check usage of APClass-based approach, i.e., uses attachment points with annotated data (i.e., the APClass) to evaluate compatibilities between attachment points.
true
if this fragment space makes use of APClass-based approach Definition at line 481 of file FragmentSpace.java.
References denoptim.fragspace.FragmentSpace.apClassBasedApproch.
Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.graph.DGraph.checkConsistency(), denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.fragspace.APMapFinder.findMappingCompatibileAPs(), denoptim.fragspace.GraphLinkFinder.GraphLinkFinder(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.fragspace.FragmentSpace.mapAPClassCompatibilities(), denoptim.ga.Population.Population(), and denoptim.ga.EAUtils.setupRings().
|
private |
Flag defining use of AP class-based approach.
Definition at line 153 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.define(), denoptim.fragspace.FragmentSpace.groupAndClassifyFragments(), denoptim.fragspace.FragmentSpace.setAPclassBasedApproach(), and denoptim.fragspace.FragmentSpace.useAPclassBasedApproach().
|
private |
Data structure that stored the true entries of the attachment point classes compatibility matrix.
Definition at line 100 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getAllAPClassesFromCPMap(), denoptim.fragspace.FragmentSpace.getCompatibilityMatrix(), denoptim.fragspace.FragmentSpace.getCompatibleAPClasses(), denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile(), and denoptim.fragspace.FragmentSpace.setCompatibilityMatrix().
|
private |
List of APClasses per each fragment.
Definition at line 133 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getAPClassesPerFragment(), and denoptim.fragspace.FragmentSpace.groupAndClassifyFragments().
|
private |
Data structure containing the molecular representation of building blocks: capping group section - fragments with only one attachment point used to saturate unused attachment points on a graph.
WARNING! The objects stores in the library do not have a meaningful value for the two indexes representing the type of building block and the position of the list of all building blocks of that type.
Definition at line 94 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.FragmentSpace(), denoptim.fragspace.FragmentSpace.getCappingGroupsWithAPClass(), denoptim.fragspace.FragmentSpace.getCappingLibrary(), denoptim.fragspace.FragmentSpace.getCappingVertexWithAPClass(), denoptim.fragspace.FragmentSpace.getCompatibleCappingFragments(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), and denoptim.fragspace.FragmentSpace.setCappingLibrary().
Data structure that stores the AP-classes to be used to cap unused APS on the growing molecule.
Definition at line 118 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getAPClassOfCappingVertex(), denoptim.fragspace.FragmentSpace.getCappingMap(), denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile(), and denoptim.fragspace.FragmentSpace.setCappingMap().
|
private |
Data structure that stores AP classes that cannot be held unused.
Definition at line 123 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getForbiddenEndList(), denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile(), and denoptim.fragspace.FragmentSpace.setForbiddenEndList().
|
private |
Data structure containing the molecular representation of building blocks: fragment section - fragments for general use.
WARNING! The objects stores in the library do not have a meaningful value for the two indexes representing the type of building block and the position of the list of all building blocks of that type.
Definition at line 84 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.FragmentSpace(), denoptim.fragspace.FragmentSpace.getFragmentLibrary(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), denoptim.fragspace.FragmentSpace.getVerticesWithAPClass(), denoptim.fragspace.FragmentSpace.hasIsomorph(), and denoptim.fragspace.FragmentSpace.setFragmentLibrary().
|
private |
Clusters of fragments based on the number of APs.
Definition at line 128 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getFragsWithNumAps(), denoptim.fragspace.FragmentSpace.getMapOfFragsPerNumAps(), and denoptim.fragspace.FragmentSpace.setFragPoolPerNumAP().
|
private |
Clusters of fragments'AP based on AP classes.
Definition at line 138 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getFragsWithAPClass(), denoptim.fragspace.FragmentSpace.getVerticesWithAPClass(), and denoptim.fragspace.FragmentSpace.groupAndClassifyFragments().
|
private |
Flag signaling that this fragment space was built and validated.
Definition at line 158 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.isDefined().
|
private |
Lock for synchronizing tasks.
Definition at line 143 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.fragspace.FragmentSpace.getAPClassesPerFragment(), denoptim.fragspace.FragmentSpace.getFragsWithAPClass(), denoptim.fragspace.FragmentSpace.getVerticesWithAPClass(), and denoptim.fragspace.FragmentSpace.groupAndClassifyFragments().
Data structure that stores compatible APclasses for joining APs in ring-closing bonds.
Symmetric, purpose specific compatibility matrix.
Definition at line 112 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getRCCompatibilityMatrix(), denoptim.fragspace.FragmentSpace.importRCCompatibilityMatrixFromFile(), and denoptim.fragspace.FragmentSpace.setRCCompatibilityMatrix().
Store references to the Ring-Closing Vertexes found in the library of fragments.
Definition at line 106 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.getRCVs(), and denoptim.fragspace.FragmentSpace.registerRCV().
|
private |
Data structure containing the molecular representation of building blocks: scaffolds section - fragments that can be used as seeds to grow a new molecule.
WARNING! The objects stores in the library do not have a meaningful value for the two indexes representing the type of building block and the position of the list of all building blocks of that type.
Definition at line 75 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.FragmentSpace(), denoptim.fragspace.FragmentSpace.getScaffoldLibrary(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), denoptim.fragspace.FragmentSpace.hasIsomorph(), denoptim.fragspace.FragmentSpace.makeRandomScaffold(), and denoptim.fragspace.FragmentSpace.setScaffoldLibrary().
|
private |
Settings used to configure this fragment space.
Contains the default values unless its value is reassigned.
Definition at line 164 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpace.define(), denoptim.fragspace.FragmentSpace.FragmentSpace(), denoptim.fragspace.FragmentSpace.getAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpace.getCappingFragment(), denoptim.fragspace.FragmentSpace.getFragmentsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpace.getRandomizer(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), denoptim.fragspace.FragmentSpace.imposeSymmetryOnAPsOfClass(), and denoptim.fragspace.FragmentSpace.makeRandomScaffold().
|
private |
APclass-specific constraints to constitutional symmetry.
Definition at line 148 of file FragmentSpace.java.
Referenced by denoptim.fragspace.FragmentSpace.clearAll(), denoptim.fragspace.FragmentSpace.getSymmetryConstrain(), denoptim.fragspace.FragmentSpace.hasSymmetryConstrain(), and denoptim.fragspace.FragmentSpace.setSymmConstraints().