$darkmode
DENOPTIM
denoptim.fragspace.FragmentSpace Class Reference

Class defining a space of building blocks. More...

Collaboration diagram for denoptim.fragspace.FragmentSpace:
[legend]

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< VertexgetScaffoldLibrary ()
 
ArrayList< VertexgetFragmentLibrary ()
 
ArrayList< VertexgetCappingLibrary ()
 
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< APClassgetCompatibleAPClasses (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, APClassgetCappingMap ()
 
APClass getAPClassOfCappingVertex (APClass srcApClass)
 
Set< APClassgetForbiddenEndList ()
 
Set< APClassgetAllAPClassesFromCPMap ()
 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< APClassgetAPClassesPerFragment (int fragId)
 Returns the APclasses associated with a given fragment. More...
 
ArrayList< IdFragmentAndAPgetFragsWithAPClass (APClass apc)
 Returns the list of attachment points with the given class. More...
 
ArrayList< VertexgetVerticesWithAPClass (APClass apc)
 Returns the list of attachment points with the given class. More...
 
ArrayList< VertexgetFragmentsCompatibleWithTheseAPs (ArrayList< IdFragmentAndAP > srcAPs)
 Searches for all building blocks that are compatible with the given list of APs. More...
 
List< VertexgetRCVsWithAPClass (APClass apc)
 Searches for all building blocks that are ring-closing vertexes and hold an AP with the given class. More...
 
List< VertexgetRCVsForAPClass (APClass apc)
 Searches for all building blocks that are ring-closing vertexes and are compatible with the given AP. More...
 
ArrayList< AttachmentPointgetAPsCompatibleWithThese (ArrayList< AttachmentPoint > srcAPs)
 Searches for all attachment points that are compatible with the given list of attachment points. More...
 
ArrayList< IdFragmentAndAPgetFragAPsCompatibleWithTheseAPs (ArrayList< IdFragmentAndAP > srcAPs)
 Searches for all APs that are compatible with the given list of APs. More...
 
ArrayList< AttachmentPointgetAPsCompatibleWithClass (APClass aPC1)
 Returns the list of attachment points found in the fragment space and that are compatible with a given AP class. More...
 
ArrayList< IdFragmentAndAPgetFragAPsCompatibleWithClass (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< VertexgetRCVs ()
 Returns the list of registered ring-closing vertexes (RCVs). More...
 
List< APMappingmapAPClassCompatibilities (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< VertexscaffoldLib = 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< VertexfragmentLib = null
 Data structure containing the molecular representation of building blocks: fragment section - fragments for general use. More...
 
ArrayList< VertexcappingLib = 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< Vertexrcvs = 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, APClasscappingMap
 Data structure that stores the AP-classes to be used to cap unused APS on the growing molecule. More...
 
Set< APClassforbiddenEndList
 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...
 

Detailed Description

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.

Author
Vishwesh Venkatraman
Marco Foscato

Definition at line 66 of file FragmentSpace.java.

Constructor & Destructor Documentation

◆ FragmentSpace() [1/5]

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.

◆ FragmentSpace() [2/5]

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.

Parameters
scaffFilepathname to library of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds).
fragFilepathname to the library of fragments for general purpose.
capFilepathname to the library of single-AP fragments used to cap free attachment points (i.e., the capping groups).
cpmFilepathname to the compatibility matrix, bond type mapping, capping, and forbidden ends rules.
Exceptions
DENOPTIMException

Definition at line 199 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.settings.

◆ FragmentSpace() [3/5]

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.

Parameters
scaffLiblibrary of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds).
fragLiblibrary of fragments for general purpose.
cappLiblibrary of single-AP fragments used to cap free attachment points (i.e., the capping groups).
cpMapthe 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).
capMapthe capping rules. This data structure is a map of APClass-to-cap (keys) to APClass-of-capping-group (values).
forbEndsthe list of forbidden ends, i.e., APClasses that cannot be left unused neither capped.
rcCpMapthe APClass compatibility matrix for ring closures.
Exceptions
DENOPTIMException

Definition at line 230 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.settings.

Here is the call graph for this function:

◆ FragmentSpace() [4/5]

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.

Parameters
scaffLiblibrary of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds).
fragLiblibrary of fragments for general purpose.
cappLiblibrary of single-AP fragments used to cap free attachment points (i.e., the capping groups).
cpMapthe 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).
capMapthe capping rules. This data structure is a map of APClass-to-cap (keys) to APClass-of-capping-group (values).
forbEndsthe list of forbidden ends, i.e., APClasses that cannot be left unused neither capped.
rcCpMapthe APClass compatibility matrix for ring closures.
symCntrMapmap of symmetry probability constraints.
Exceptions
DENOPTIMException

Definition at line 268 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.settings.

Here is the call graph for this function:

◆ FragmentSpace() [5/5]

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.

Parameters
scaffFilepathname 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.
fragFilepathname to the library of fragments for general purpose. Can be null or empty in which case no fragment is imported.
capFilepathname to the library of single-AP fragments used to cap free attachment points (i.e., the capping groups).
cpmFilepathname to the compatibility matrix, capping, and forbidden ends rules.
rcpmFilethe APClass compatibility matrix for ring closures.
symCntrMapmap of symmetry probability constraints.
Exceptions
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.

Here is the call graph for this function:

Member Function Documentation

◆ addFusedRingsToFragmentLibrary() [1/3]

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().

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

◆ addFusedRingsToFragmentLibrary() [2/3]

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.

Parameters
graphthe graph to analyze and possibly chop.
addIfScaffolduse true to enable saving of new ring systems that contain any scaffold vertexes as new scaffolds.
addIfFragmentuse 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().

Here is the call graph for this function:

◆ addFusedRingsToFragmentLibrary() [3/3]

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.

Parameters
graphthe graph to analyze and possibly chop.
addIfScaffolduse true to enable saving of new ring systems that contain any scaffold vertexes as new scaffolds.
addIfFragmentuse true to enable saving of new ring systems that do NOT contain any scaffold vertexes as new fragments.
wholeMolthe 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().

Here is the call graph for this function:

◆ appendVertexToLibrary()

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.

Parameters
vvertex to import.
bbtthe type of building block the vertex should be set to.
librarywhere 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().

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

◆ appendVerticesToLibrary()

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.

Parameters
listof vertices to import.
bbtthe type of building block the vertices should be set to.
librarywhere 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().

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

◆ classifyFragment()

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).

Parameters
frgthe building block to classify
idthe index of the fragment in the library
Exceptions
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().

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

◆ clearAll()

◆ define()

void denoptim.fragspace.FragmentSpace.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
private

Define all components of this fragment space.

Parameters
scaffLiblibrary of fragments used to start the construction of any new graph (i.e., seed or root fragments, a.k.a. scaffolds).
fragLiblibrary of fragments for general purpose.
cappLiblibrary of single-AP fragments used to cap free attachment points (i.e., the capping groups).
cpMapthe 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).
capMapthe capping rules. This data structure is a map of APClass-to-cap (keys) to APClass-of-capping-group (values).
forbEndsthe list of forbidden ends, i.e., APClasses that cannot be left unused neither capped.
rcCpMapthe APClass compatibility matrix for ring closures.
symCntrMapmap of symmetry probability constraints.
Exceptions
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().

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

◆ getAllAPClassesFromCPMap()

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.

Returns
the lst of APClasses

Definition at line 908 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix.

Referenced by denoptim.gui.FSParametersForm.FSParametersForm().

Here is the caller graph for this function:

◆ getAPClassesPerFragment()

ArrayList< APClass > denoptim.fragspace.FragmentSpace.getAPClassesPerFragment ( int  fragId)

Returns the APclasses associated with a given fragment.

Parameters
fragIdthe index of the fragment in the library
Returns
the list of APclasses found of the fragment

Definition at line 948 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.apClassesPerFrag, and denoptim.fragspace.FragmentSpace.LOCK.

◆ getAPClassForFragment()

APClass denoptim.fragspace.FragmentSpace.getAPClassForFragment ( IdFragmentAndAP  apId)

Search for a specific AP on a specific fragment and finds out its class.

Parameters
apIdthe identified of a specific attachment point.
Returns
the AP class or null

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().

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

◆ getAPClassOfCappingVertex()

APClass denoptim.fragspace.FragmentSpace.getAPClassOfCappingVertex ( APClass  srcApClass)
Parameters
srcApClassthe attachment point class of the attachment point to be capped
Returns
the APClass of the capping group or null

Definition at line 885 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.cappingMap.

Referenced by denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), and denoptim.graph.DGraph.graphNeedsCappingGroups().

Here is the caller graph for this function:

◆ getAPsCompatibleWithClass()

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.

Parameters
aPC1the 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().

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

◆ 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.

Parameters
srcAPsattachment points meant to results have to be compatible with.
Returns
a list of compatible attachment points found in the library of fragments.

Definition at line 1140 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.getAPsCompatibleWithClass().

Referenced by denoptim.gui.GUIGraphHandler.collectFragAndAPsCompatibleWithSelectedAPs().

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

◆ getCappingFragment()

int denoptim.fragspace.FragmentSpace.getCappingFragment ( APClass  rcnCap)

Select a compatible capping group for the given APClass.

Parameters
rcnCapthe class of the attachment point to be capped.
Returns
the index of capping group

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.

Here is the call graph for this function:

◆ getCappingGroupsWithAPClass()

ArrayList< Integer > denoptim.fragspace.FragmentSpace.getCappingGroupsWithAPClass ( APClass  capApCls)
Parameters
capApClsthe APClass of the attachment point on the capping group
Returns
all the capping groups which have the given 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().

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

◆ getCappingLibrary()

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().

Here is the caller graph for this function:

◆ getCappingMap()

HashMap< APClass, APClass > denoptim.fragspace.FragmentSpace.getCappingMap ( )

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().

Here is the caller graph for this function:

◆ getCappingVertexWithAPClass()

Vertex denoptim.fragspace.FragmentSpace.getCappingVertexWithAPClass ( APClass  capApCls)
Parameters
capApClsthe APClass of the attachment point on the capping group.
Returns
a clone of the first 'capping group' having the given 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().

Here is the call graph for this function:

◆ getCompatibilityMatrix()

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().

Here is the caller graph for this function:

◆ getCompatibleAPClasses()

ArrayList< APClass > denoptim.fragspace.FragmentSpace.getCompatibleAPClasses ( APClass  apc)

Returns a list of APClasses compatible with the given APClass.

The compatibility among classes is defined by the compatibility matrix

Parameters
apc
Returns
the list of compatible APClasses. Can be empty but not null.

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().

Here is the caller graph for this function:

◆ getCompatibleCappingFragments()

ArrayList< Integer > denoptim.fragspace.FragmentSpace.getCompatibleCappingFragments ( APClass  cmpReac)

Retrieve a list of compatible capping groups.

Parameters
cmpReac
Returns
a list of compatible capping groups

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().

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

◆ getForbiddenEndList()

Set< APClass > denoptim.fragspace.FragmentSpace.getForbiddenEndList ( )

◆ getFragAPsCompatibleWithClass()

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.

Parameters
aPC1the 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().

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

◆ getFragAPsCompatibleWithTheseAPs()

ArrayList< IdFragmentAndAP > denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithTheseAPs ( ArrayList< IdFragmentAndAP srcAPs)

Searches for all APs that are compatible with the given list of APs.

Parameters
srcAPsthe identifiers of APs meant to hold any of the desired fragments.
Returns
a list of identifiers for APs on fragments in the library.

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().

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

◆ getFragmentLibrary()

◆ getFragmentsCompatibleWithTheseAPs()

ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getFragmentsCompatibleWithTheseAPs ( ArrayList< IdFragmentAndAP srcAPs)

Searches for all building blocks that are compatible with the given list of APs.

Parameters
srcAPsthe identifiers of APs meant to hold any of the desired fragments.
Returns
a list of 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().

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

◆ getFragsWithAPClass()

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.

Parameters
apc
Returns
the list of AP identifiers.

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().

Here is the caller graph for this function:

◆ getFragsWithNumAps()

ArrayList< Integer > denoptim.fragspace.FragmentSpace.getFragsWithNumAps ( int  nAps)

Returns the list of fragments with given number of APs.

Parameters
nApsthe number of attachment points
Returns
the list of fragments as indexes in the library of fragments.

Definition at line 929 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.fragPoolPerNumAP.

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

Here is the caller graph for this function:

◆ getMapOfFragsPerNumAps()

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().

Here is the caller graph for this function:

◆ getPolarizedRCV()

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.

Parameters
polarityuse true to get an RCV with attachment point class APClass#ATPLUSS and false to get APClass#ATMINUS.
Returns
the ring-closing vertex.

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().

Here is the call graph for this function:

◆ getRandomizer()

Randomizer denoptim.fragspace.FragmentSpace.getRandomizer ( )

Returns the program-specific randomizer that is associated with this program-specific fragment space.

Returns
the program-specific randomizer.

Definition at line 456 of file FragmentSpace.java.

References denoptim.programs.RunTimeParameters.getRandomizer(), and denoptim.fragspace.FragmentSpace.settings.

Referenced by denoptim.fragspace.APMapFinder.findAllMappings().

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

◆ getRCCompatibilityMatrix()

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.

Returns

Definition at line 865 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.rcCompatMap.

Referenced by denoptim.graph.rings.RingSizeManager.evaluateRCVPair().

Here is the caller graph for this function:

◆ getRCVs()

ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getRCVs ( )

Returns the list of registered ring-closing vertexes (RCVs).

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().

Here is the caller graph for this function:

◆ getRCVsForAPClass()

List< Vertex > denoptim.fragspace.FragmentSpace.getRCVsForAPClass ( APClass  apc)

Searches for all building blocks that are ring-closing vertexes and are compatible with the given AP.

Parameters
apcthe class of the attachment point meant to hold the RCV.
Returns
a list of vertexes ready to be used (i.e., clones of the vertexes stored in the library). The list can be empty.

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().

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

◆ getRCVsWithAPClass()

List< Vertex > denoptim.fragspace.FragmentSpace.getRCVsWithAPClass ( APClass  apc)

Searches for all building blocks that are ring-closing vertexes and hold an AP with the given class.

Parameters
apcthe desired class of the attachment point.
Returns
a list of vertexes ready to be used (i.e., clones of the vertexes stored in the library). The list can be empty.

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().

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

◆ getScaffoldLibrary()

◆ getSymmetryConstrain()

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).

Parameters
apClassthe attachment point class
Returns
the constrained value of the symmetric substitution probability (0.0 - 1.0).

Definition at line 1374 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.symmConstraints.

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

Here is the caller graph for this function:

◆ getVertexFromLibrary()

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.

Parameters
bbTypethe 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).
bbIdxthe index (0-based) of the building block in the corresponding library defied by the type of building block 'bbType'
Returns
a clone of the chosen building block.
Exceptions
DENOPTIMExceptionwhen 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().

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

◆ getVerticesWithAPClass()

ArrayList< Vertex > denoptim.fragspace.FragmentSpace.getVerticesWithAPClass ( APClass  apc)

Returns the list of attachment points with the given class.

Parameters
apcthe attachment point class to search.
Returns
the list of matching attachment points.

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().

Here is the caller graph for this function:

◆ groupAndClassifyFragments()

void denoptim.fragspace.FragmentSpace.groupAndClassifyFragments ( boolean  apClassBasedApproch) throws DENOPTIMException

Performs grouping and classification operations on the library of building blocks of BBType#FRAGMENT.

Parameters
apClassBasedApprochtrue 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().

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

◆ hasIsomorph()

boolean denoptim.fragspace.FragmentSpace.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).

Parameters
graphto check if has an isomorph in the fragment space.
typespecifying which fragment library to check for isomorphs in.
Returns
true if there is an isomorph template in the library of the specified type.

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().

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

◆ hasSymmetryConstrain()

boolean denoptim.fragspace.FragmentSpace.hasSymmetryConstrain ( APClass  apClass)

Checks if there is a constraint on the constitutional symmetry probability for the given AP class.

Parameters
apClassthe attachment point class
Returns
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().

Here is the caller graph for this function:

◆ importCompatibilityMatrixFromFile()

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.

Parameters
inFilethe 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().

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

◆ importRCCompatibilityMatrixFromFile()

void denoptim.fragspace.FragmentSpace.importRCCompatibilityMatrixFromFile ( String  inFile) throws DENOPTIMException

Load info for ring closures compatibilities from a compatibility matrix file.

Parameters
inFilethe 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().

Here is the call graph for this function:

◆ imposeSymmetryOnAPsOfClass()

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.

Parameters
apClassthe attachment point class
Returns
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().

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

◆ isDefined()

boolean denoptim.fragspace.FragmentSpace.isDefined ( )

Checks for valid definition of this fragment space.

Returns
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().

Here is the caller graph for this function:

◆ makeRandomScaffold()

Vertex denoptim.fragspace.FragmentSpace.makeRandomScaffold ( )

Randomly select a scaffold and return a fully configured clone of it.

Returns
a scaffold-type building block ready to be used in a new graph.
Exceptions
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().

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

◆ mapAPClassCompatibilities()

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.

Parameters
listAlist of candidate source APs
listBlist of candidate target APs
maxCombinationsa maximum limit; if reached we are happy we give up finding more combination.
Returns

Definition at line 1758 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpaceUtils.recursiveCombiner(), and denoptim.fragspace.FragmentSpace.useAPclassBasedApproach().

Here is the call graph for this function:

◆ registerRCV()

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.

Parameters
vthe 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().

Here is the caller graph for this function:

◆ setAPclassBasedApproach()

◆ setCappingLibrary()

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().

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

◆ setCappingMap()

void denoptim.fragspace.FragmentSpace.setCappingMap ( HashMap< APClass, APClass map)

Definition at line 1418 of file FragmentSpace.java.

References denoptim.fragspace.FragmentSpace.cappingMap.

Referenced by denoptim.fragspace.FragmentSpace.define(), and denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile().

Here is the caller graph for this function:

◆ setCompatibilityMatrix()

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().

Here is the caller graph for this function:

◆ setForbiddenEndList()

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().

Here is the caller graph for this function:

◆ setFragmentLibrary()

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().

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

◆ setFragPoolPerNumAP()

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().

Here is the caller graph for this function:

◆ setRCCompatibilityMatrix()

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().

Here is the caller graph for this function:

◆ setScaffoldLibrary()

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().

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

◆ setSymmConstraints()

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().

Here is the caller graph for this function:

◆ useAPclassBasedApproach()

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.

Returns
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().

Here is the caller graph for this function:

Member Data Documentation

◆ apClassBasedApproch

boolean denoptim.fragspace.FragmentSpace.apClassBasedApproch = false
private

◆ apClassCompatibilityMatrix

HashMap<APClass, ArrayList<APClass> > denoptim.fragspace.FragmentSpace.apClassCompatibilityMatrix
private

◆ apClassesPerFrag

HashMap<Integer, ArrayList<APClass> > denoptim.fragspace.FragmentSpace.apClassesPerFrag
private

◆ cappingLib

ArrayList<Vertex> denoptim.fragspace.FragmentSpace.cappingLib = null
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().

◆ cappingMap

HashMap<APClass, APClass> denoptim.fragspace.FragmentSpace.cappingMap
private

◆ forbiddenEndList

Set<APClass> denoptim.fragspace.FragmentSpace.forbiddenEndList
private

◆ fragmentLib

ArrayList<Vertex> denoptim.fragspace.FragmentSpace.fragmentLib = null
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().

◆ fragPoolPerNumAP

HashMap<Integer, ArrayList<Integer> > denoptim.fragspace.FragmentSpace.fragPoolPerNumAP
private

◆ fragsApsPerApClass

HashMap<APClass, ArrayList<ArrayList<Integer> > > denoptim.fragspace.FragmentSpace.fragsApsPerApClass
private

◆ isValid

boolean denoptim.fragspace.FragmentSpace.isValid = false
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().

◆ LOCK

◆ rcCompatMap

HashMap<APClass, ArrayList<APClass> > denoptim.fragspace.FragmentSpace.rcCompatMap
private

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().

◆ rcvs

ArrayList<Vertex> denoptim.fragspace.FragmentSpace.rcvs = new ArrayList<Vertex>()
private

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().

◆ scaffoldLib

ArrayList<Vertex> denoptim.fragspace.FragmentSpace.scaffoldLib = null
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().

◆ settings

◆ symmConstraints

HashMap<APClass, Double> denoptim.fragspace.FragmentSpace.symmConstraints
private

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