$darkmode
DENOPTIM
denoptim.combinatorial.GraphBuildingTask Class Reference

Task that builds a graph by appending a given combination of fragments onto a given list of attachment points of a given root graph. More...

Inheritance diagram for denoptim.combinatorial.GraphBuildingTask:
[legend]
Collaboration diagram for denoptim.combinatorial.GraphBuildingTask:
[legend]

Public Member Functions

 GraphBuildingTask (CEBLParameters settings, DGraph molGraph, FragsCombination fragsToAdd, int level, String workDir, int verbosity) throws DENOPTIMException
 Constructor. More...
 
int getNumberOfSubTasks ()
 
int getLevel ()
 
ArrayList< Integer > getNextIds ()
 Returns the set of indeces that identify the position of the the (next) combination of fragment in the space of combinations. More...
 
int getGraphId ()
 Returns the graphID of the original graph or of the latest cyclic alternative. More...
 
int getRootId ()
 Returns the graphID of the root graph. More...
 
void setNextIds (ArrayList< Integer > nextIds) throws DENOPTIMException
 Set the set of indexes that identify the position of the the (next) combination of fragment in the space of combinations. More...
 
Object call () throws Exception
 Calls the task. More...
 
- Public Member Functions inherited from denoptim.task.FitnessTask
 FitnessTask (FitnessParameters settings, Candidate c)
 
- Public Member Functions inherited from denoptim.task.Task
 Task (final int id)
 
int getId ()
 
void setVerbosity (int verbosity)
 Set the verbosity: i.e., amount of log printed by this class. More...
 
void setWorkSpace (File workDir)
 Sets the pathname of the work space, i.e., the location where the task is supposed to use move to or to threat as the result of "pwd" at runtime. More...
 
boolean isCompleted ()
 
boolean foundException ()
 
Throwable getException ()
 
String getErrorMessage ()
 
void stopTask ()
 Stop the task if not already completed. More...
 
String toString ()
 Returns a string identifying this task by its ID and reporting whether an exception has been thrown and if the tasks is completed. More...
 
void setNotify (boolean notify)
 

Private Member Functions

void sendToFitnessProvider (Object[] res) throws Throwable
 

Private Attributes

int rootId
 The graph ID of the root graph. More...
 
int graphId
 GraphID: may be from the original graph or from its latest generated cyclic alternative. More...
 
int level
 The active level of modification. More...
 
FragsCombination fragsToAdd
 Pointer defining the active combination for this task. More...
 
int nSubTasks = 0
 Number of subtasks. More...
 
ArrayList< Integer > nextIds
 Vector of indexes identifying the next combination of fragments. More...
 
ThreeDimTreeBuilder tb3d
 Tool for generating 3D models assembling 3D building blocks. More...
 
CEBLParameters ceblSettings = null
 Collection of settings controlling the execution of the task. More...
 
FragmentSpace fragSpace
 The fragment space. More...
 

Additional Inherited Members

- Public Attributes inherited from denoptim.task.Task
Object lock = new Object()
 Lock for addressing synchronization issues. More...
 
- Protected Member Functions inherited from denoptim.task.FitnessTask
void runFitnessProvider () throws DENOPTIMException
 This method runs the actual evaluation of the fitness, whether that is run internally (i.e., within this instance of the JAVA VM), or delegated to an external child process. More...
 
- Protected Attributes inherited from denoptim.task.FitnessTask
DGraph dGraph
 The graph representation of the entity to evaluate. More...
 
IAtomContainer fitProvMol = null
 The chemical representation of the entity to evaluate. More...
 
Candidate result
 The data structure holding the results of this task. More...
 
String fitProvInputFile
 The file where we store the input to the fitness provider. More...
 
String fitProvOutFile
 The file where we store the final output from the fitness provider. More...
 
String fitProvPNGFile
 The file where we store the graphical representation of the candidate (i.e., a picture). More...
 
String fitProvUIDFile = null
 The file where we store the list of unique identifiers or previously evaluated candidates. More...
 
boolean fitnessIsRequired = false
 Flag specifying if a valid fitness value is required to consider the task successfully completed. More...
 
FitnessParameters fitnessSettings
 Settings for the calculation of the fitness. More...
 
- Protected Attributes inherited from denoptim.task.Task
boolean notifyGlobalTaskManager = false
 Flag controlling whether this task is expected to notify the static task manager. More...
 
boolean completed = false
 Flag about completion. More...
 
boolean hasException = false
 Flag about exception. More...
 
String errMsg = ""
 Error message produced by any subtask. More...
 
Throwable thrownExc
 Exception thrown. More...
 
int id
 A user-assigned id for this task. More...
 
ProcessHandler processHandler
 Executor for external bash script. More...
 
File workDir
 The file system location where we want to be placed when doing the work. More...
 
int verbosity = 0
 Verbosity level. More...
 
final String SEP = System.getProperty("file.separator")
 System-dependent file separator. More...
 
final String NL = System.getProperty("line.separator")
 System-dependent line separator (newline) More...
 

Detailed Description

Task that builds a graph by appending a given combination of fragments onto a given list of attachment points of a given root graph.

Author
Marco Foscato

Definition at line 57 of file GraphBuildingTask.java.

Constructor & Destructor Documentation

◆ GraphBuildingTask()

Member Function Documentation

◆ call()

Object denoptim.combinatorial.GraphBuildingTask.call ( ) throws Exception

Calls the task.

Definition at line 215 of file GraphBuildingTask.java.

References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.combinatorial.GraphBuildingTask.ceblSettings, denoptim.graph.DGraph.checkConsistency(), denoptim.graph.DGraph.clone(), denoptim.task.Task.completed, denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.task.FitnessTask.dGraph, denoptim.task.FitnessTask.fitnessSettings, denoptim.combinatorial.GraphBuildingTask.fragSpace, denoptim.combinatorial.GraphBuildingTask.fragsToAdd, denoptim.graph.Vertex.getAP(), denoptim.fragspace.IdFragmentAndAP.getApId(), denoptim.graph.DGraph.getGraphId(), denoptim.utils.MoleculeUtils.getInChIKeyForMolecule(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.utils.MoleculeUtils.getSMILESForMolecule(), denoptim.fragspace.IdFragmentAndAP.getVertexId(), denoptim.fragspace.IdFragmentAndAP.getVertexMolId(), denoptim.fragspace.IdFragmentAndAP.getVertexMolType(), denoptim.graph.DGraph.getVertexWithId(), denoptim.fragspace.IdFragmentAndAP.getVrtSymSetId(), denoptim.combinatorial.GraphBuildingTask.graphId, denoptim.graph.DGraph.graphNeedsCappingGroups(), denoptim.task.Task.hasException, denoptim.combinatorial.GraphBuildingTask.level, denoptim.fitness.FitnessParameters.make3dTree(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.combinatorial.GraphBuildingTask.nextIds, denoptim.graph.Vertex.BBType.NONE, denoptim.combinatorial.GraphBuildingTask.nSubTasks, denoptim.graph.DGraph.replaceUnusedRCVsWithCapps(), denoptim.task.FitnessTask.result, denoptim.combinatorial.GraphBuildingTask.rootId, denoptim.combinatorial.GraphBuildingTask.sendToFitnessProvider(), denoptim.molecularmodeling.ThreeDimTreeBuilder.setAlignBBsIn3D(), denoptim.graph.Candidate.setGraph(), denoptim.combinatorial.CEBLUtils.storeGraphOfLevel(), denoptim.programs.combinatorial.CEBLParameters.submitFitnessTask(), denoptim.combinatorial.GraphBuildingTask.tb3d, denoptim.task.Task.thrownExc, denoptim.graph.Vertex.BBType.UNDEFINED, denoptim.fragspace.FragmentSpace.useAPclassBasedApproach(), and denoptim.task.Task.verbosity.

Here is the call graph for this function:

◆ getGraphId()

int denoptim.combinatorial.GraphBuildingTask.getGraphId ( )

Returns the graphID of the original graph or of the latest cyclic alternative.

Definition at line 178 of file GraphBuildingTask.java.

References denoptim.combinatorial.GraphBuildingTask.graphId.

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint().

Here is the caller graph for this function:

◆ getLevel()

int denoptim.combinatorial.GraphBuildingTask.getLevel ( )
Returns
the the level from which this graph has been generated

Definition at line 154 of file GraphBuildingTask.java.

References denoptim.combinatorial.GraphBuildingTask.level.

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint().

Here is the caller graph for this function:

◆ getNextIds()

ArrayList< Integer > denoptim.combinatorial.GraphBuildingTask.getNextIds ( )

Returns the set of indeces that identify the position of the the (next) combination of fragment in the space of combinations.

Definition at line 166 of file GraphBuildingTask.java.

References denoptim.combinatorial.GraphBuildingTask.nextIds.

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint().

Here is the caller graph for this function:

◆ getNumberOfSubTasks()

int denoptim.combinatorial.GraphBuildingTask.getNumberOfSubTasks ( )
Returns
the total number of serial subtasks performed by this task.

Definition at line 143 of file GraphBuildingTask.java.

References denoptim.combinatorial.GraphBuildingTask.nSubTasks.

◆ getRootId()

int denoptim.combinatorial.GraphBuildingTask.getRootId ( )

Returns the graphID of the root graph.

Definition at line 189 of file GraphBuildingTask.java.

References denoptim.combinatorial.GraphBuildingTask.rootId.

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint().

Here is the caller graph for this function:

◆ sendToFitnessProvider()

void denoptim.combinatorial.GraphBuildingTask.sendToFitnessProvider ( Object[]  res) throws Throwable
private
Parameters
resthe vector containing the results from the evaluation of the graph representation

Definition at line 472 of file GraphBuildingTask.java.

References denoptim.constants.DENOPTIMConstants.CANDIDATE2DEXTENSION, denoptim.combinatorial.GraphBuildingTask.ceblSettings, denoptim.constants.DENOPTIMConstants.FITFILENAMEEXTIN, denoptim.constants.DENOPTIMConstants.FITFILENAMEEXTOUT, denoptim.task.FitnessTask.fitProvInputFile, denoptim.task.FitnessTask.fitProvMol, denoptim.task.FitnessTask.fitProvOutFile, denoptim.task.FitnessTask.fitProvPNGFile, denoptim.task.FitnessTask.fitProvUIDFile, denoptim.utils.GeneralUtils.getPaddedString(), denoptim.programs.combinatorial.CEBLParameters.getUIDFileName(), denoptim.utils.GraphUtils.getUniqueMoleculeIndex(), denoptim.constants.DENOPTIMConstants.GRAPHLEVELTAG, denoptim.constants.DENOPTIMConstants.INCHIKEYTAG, denoptim.combinatorial.GraphBuildingTask.level, denoptim.constants.DENOPTIMConstants.MOLDIGITS, denoptim.constants.DENOPTIMConstants.PARENTGRAPHTAG, denoptim.task.FitnessTask.result, denoptim.task.FitnessTask.runFitnessProvider(), denoptim.task.Task.SEP, denoptim.graph.Candidate.setName(), denoptim.graph.Candidate.setSmiles(), denoptim.graph.Candidate.setUID(), denoptim.constants.DENOPTIMConstants.SMILESTAG, denoptim.constants.DENOPTIMConstants.UNIQUEIDTAG, and denoptim.task.Task.workDir.

Referenced by denoptim.combinatorial.GraphBuildingTask.call().

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

◆ setNextIds()

void denoptim.combinatorial.GraphBuildingTask.setNextIds ( ArrayList< Integer >  nextIds) throws DENOPTIMException

Set the set of indexes that identify the position of the the (next) combination of fragment in the space of combinations.

Definition at line 201 of file GraphBuildingTask.java.

References denoptim.combinatorial.GraphBuildingTask.nextIds.

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel().

Here is the caller graph for this function:

Member Data Documentation

◆ ceblSettings

CEBLParameters denoptim.combinatorial.GraphBuildingTask.ceblSettings = null
private

Collection of settings controlling the execution of the task.

Definition at line 99 of file GraphBuildingTask.java.

Referenced by denoptim.combinatorial.GraphBuildingTask.call(), and denoptim.combinatorial.GraphBuildingTask.sendToFitnessProvider().

◆ fragSpace

FragmentSpace denoptim.combinatorial.GraphBuildingTask.fragSpace
private

The fragment space.

Definition at line 104 of file GraphBuildingTask.java.

Referenced by denoptim.combinatorial.GraphBuildingTask.call().

◆ fragsToAdd

FragsCombination denoptim.combinatorial.GraphBuildingTask.fragsToAdd
private

Pointer defining the active combination for this task.

Definition at line 78 of file GraphBuildingTask.java.

Referenced by denoptim.combinatorial.GraphBuildingTask.call(), and denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask().

◆ graphId

int denoptim.combinatorial.GraphBuildingTask.graphId
private

GraphID: may be from the original graph or from its latest generated cyclic alternative.

Definition at line 68 of file GraphBuildingTask.java.

Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.combinatorial.GraphBuildingTask.getGraphId(), and denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask().

◆ level

◆ nextIds

ArrayList<Integer> denoptim.combinatorial.GraphBuildingTask.nextIds
private

Vector of indexes identifying the next combination of fragments.

This is used only to store info needed to make checkpoint files.

Definition at line 89 of file GraphBuildingTask.java.

Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.combinatorial.GraphBuildingTask.getNextIds(), and denoptim.combinatorial.GraphBuildingTask.setNextIds().

◆ nSubTasks

int denoptim.combinatorial.GraphBuildingTask.nSubTasks = 0
private

◆ rootId

int denoptim.combinatorial.GraphBuildingTask.rootId
private

◆ tb3d

ThreeDimTreeBuilder denoptim.combinatorial.GraphBuildingTask.tb3d
private

Tool for generating 3D models assembling 3D building blocks.

Definition at line 94 of file GraphBuildingTask.java.

Referenced by denoptim.combinatorial.GraphBuildingTask.call().


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