$darkmode
DENOPTIM
denoptim.programs.genetweeker.GeneOpsRunner Class Reference

Tool to run genetic operations in a stand-alone fashion, i.e., outside of a genetic algorithm run. More...

Inheritance diagram for denoptim.programs.genetweeker.GeneOpsRunner:
[legend]
Collaboration diagram for denoptim.programs.genetweeker.GeneOpsRunner:
[legend]

Public Member Functions

 GeneOpsRunner (File configFile, File workDir)
 Creates and configures the program task. More...
 
void runProgram () throws Throwable
 
- Public Member Functions inherited from denoptim.task.ProgramTask
 ProgramTask (File configFile, File workDir)
 Creates and configures the program task. More...
 
Object call ()
 This method redirects the callable functionality to an abstract method (namely ProgramTask#runProgram()) to be specified by the implementations of this abstract class. More...
 
void printErrorToFile ()
 Method that can be called to create a text file with the error triggered by any Throwable that can be thrown by the execution of the program. More...
 
- 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 runMutation () throws DENOPTIMException
 
void runXOver () throws DENOPTIMException
 
Set< VertexgetSubGraphEnds (DGraph graph, List< int[]> embeddingPaths, String operation)
 
Vertex getEmbeddedVertex (int[] embeddingPath, DGraph graph, String operation)
 

Private Attributes

GeneOpsRunnerParameters settings
 Settings from input parameters. More...
 
FragmentSpace fragSpace
 Fragment space in use. More...
 
GAParameters gaParams
 Parameters for genetic algorithm. More...
 
Logger logger = null
 Program-specific logger. 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.ProgramTask
void handleThrowable ()
 Method to handle any Throwable originated from the runProgram() method. More...
 
void stopLogger ()
 Stops the program-specific logger and releases the lock file on the logfile. More...
 
abstract void runProgram () throws Throwable
 
- Protected Attributes inherited from denoptim.task.ProgramTask
File configFilePathName
 File containing configuration parameters for the program task. More...
 
String loggerIdentifier = "none"
 Identifier of this program's logger. 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

Tool to run genetic operations in a stand-alone fashion, i.e., outside of a genetic algorithm run.

Author
Marco Foscato

Definition at line 56 of file GeneOpsRunner.java.

Constructor & Destructor Documentation

◆ GeneOpsRunner()

denoptim.programs.genetweeker.GeneOpsRunner.GeneOpsRunner ( File  configFile,
File  workDir 
)

Creates and configures the program task.

Parameters
configFilethe file containing the configuration parameters.
workDirthe file system location from which to run the program.

Definition at line 86 of file GeneOpsRunner.java.

References denoptim.task.Task.workDir.

Member Function Documentation

◆ getEmbeddedVertex()

Vertex denoptim.programs.genetweeker.GeneOpsRunner.getEmbeddedVertex ( int[]  embeddingPath,
DGraph  graph,
String  operation 
)
private

Definition at line 304 of file GeneOpsRunner.java.

References denoptim.graph.DGraph.getVertexWithId(), and denoptim.programs.genetweeker.GeneOpsRunner.logger.

Referenced by denoptim.programs.genetweeker.GeneOpsRunner.getSubGraphEnds(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), and denoptim.programs.genetweeker.GeneOpsRunner.runXOver().

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

◆ getSubGraphEnds()

Set< Vertex > denoptim.programs.genetweeker.GeneOpsRunner.getSubGraphEnds ( DGraph  graph,
List< int[]>  embeddingPaths,
String  operation 
)
private

Definition at line 291 of file GeneOpsRunner.java.

References denoptim.programs.genetweeker.GeneOpsRunner.getEmbeddedVertex().

Referenced by denoptim.programs.genetweeker.GeneOpsRunner.runXOver().

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

◆ runMutation()

void denoptim.programs.genetweeker.GeneOpsRunner.runMutation ( ) throws DENOPTIMException
private

Definition at line 136 of file GeneOpsRunner.java.

References denoptim.utils.MutationType.ADDLINK, denoptim.programs.RunTimeParameters.containsParameters(), denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.programs.RunTimeParameters.ParametersType.FS_PARAMS, denoptim.programs.RunTimeParameters.ParametersType.GA_PARAMS, denoptim.programs.genetweeker.GeneOpsRunner.gaParams, denoptim.programs.genetweeker.GeneOpsRunner.getEmbeddedVertex(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.RunTimeParameters.getParameters(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.graph.Vertex.getVertexId(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.idNewAP, denoptim.programs.genetweeker.GeneOpsRunnerParameters.idNewVrt, denoptim.programs.genetweeker.GeneOpsRunnerParameters.idTargetAP, denoptim.programs.genetweeker.GeneOpsRunnerParameters.inpFileM, denoptim.programs.genetweeker.GeneOpsRunner.logger, denoptim.programs.genetweeker.GeneOpsRunnerParameters.mutationTarget, denoptim.programs.genetweeker.GeneOpsRunnerParameters.mutationType, denoptim.task.Task.NL, denoptim.programs.genetweeker.GeneOpsRunnerParameters.outFileM, denoptim.ga.GraphOperations.performMutation(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile(), denoptim.programs.RunTimeParameters.setParameters(), denoptim.graph.Vertex.setProperty(), denoptim.programs.genetweeker.GeneOpsRunner.settings, denoptim.constants.DENOPTIMConstants.STOREDVID, denoptim.graph.DGraph.toString(), and denoptim.io.DenoptimIO.writeSDFFile().

Referenced by denoptim.programs.genetweeker.GeneOpsRunner.runProgram().

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

◆ runProgram()

◆ runXOver()

void denoptim.programs.genetweeker.GeneOpsRunner.runXOver ( ) throws DENOPTIMException
private

Definition at line 207 of file GeneOpsRunner.java.

References denoptim.utils.CrossoverType.BRANCH, denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.programs.genetweeker.GeneOpsRunner.fragSpace, denoptim.programs.genetweeker.GeneOpsRunner.gaParams, denoptim.graph.DGraph.getChildTreeLimited(), denoptim.programs.genetweeker.GeneOpsRunner.getEmbeddedVertex(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.programs.genetweeker.GeneOpsRunner.getSubGraphEnds(), denoptim.graph.Vertex.getVertexId(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.inpFileF, denoptim.programs.genetweeker.GeneOpsRunnerParameters.inpFileM, denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.programs.genetweeker.GeneOpsRunner.logger, denoptim.programs.denovo.GAParameters.maxXOverableSubGraphSize, denoptim.task.Task.NL, denoptim.programs.genetweeker.GeneOpsRunnerParameters.outFileF, denoptim.programs.genetweeker.GeneOpsRunnerParameters.outFileM, denoptim.ga.GraphOperations.performCrossover(), denoptim.utils.Randomizer.randomlyChooseOne(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile(), denoptim.graph.DGraph.renumberGraphVertices(), denoptim.programs.genetweeker.GeneOpsRunner.settings, denoptim.utils.CrossoverType.SUBGRAPH, denoptim.io.DenoptimIO.writeSDFFile(), denoptim.programs.genetweeker.GeneOpsRunnerParameters.xoverSrcFemale, denoptim.programs.genetweeker.GeneOpsRunnerParameters.xoverSrcMale, denoptim.programs.genetweeker.GeneOpsRunnerParameters.xoverSubGraphEndFemale, and denoptim.programs.genetweeker.GeneOpsRunnerParameters.xoverSubGraphEndMale.

Referenced by denoptim.programs.genetweeker.GeneOpsRunner.runProgram().

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

Member Data Documentation

◆ fragSpace

FragmentSpace denoptim.programs.genetweeker.GeneOpsRunner.fragSpace
private

Fragment space in use.

Definition at line 67 of file GeneOpsRunner.java.

Referenced by denoptim.programs.genetweeker.GeneOpsRunner.runXOver().

◆ gaParams

GAParameters denoptim.programs.genetweeker.GeneOpsRunner.gaParams
private

◆ logger

Logger denoptim.programs.genetweeker.GeneOpsRunner.logger = null
private

◆ settings

GeneOpsRunnerParameters denoptim.programs.genetweeker.GeneOpsRunner.settings
private

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