$darkmode
DENOPTIM
denoptim.fragmenter.FragmenterTask Class Reference

Task that performs the various steps in the process that prepares chemical structured to be chopped, chops them, and post-process the resulting fragments. More...

Inheritance diagram for denoptim.fragmenter.FragmenterTask:
[legend]
Collaboration diagram for denoptim.fragmenter.FragmenterTask:
[legend]

Public Member Functions

 FragmenterTask (File inputFile, FragmenterParameters settings, int id) throws SecurityException, IOException
 Create a task by giving the input file (i.e., containing structures to work with) and the configuration of the task. More...
 
String getLogFilePathname ()
 
String getResultFile ()
 
Object call () throws Exception
 Performs the whatever work has to be done by this task. 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)
 

Protected Attributes

String results = null
 The data structure holding the results of this task. More...
 
FragmenterParameters settings
 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...
 

Static Package Functions

static String getInputFileName (FragmenterParameters settings, int i)
 Builds the pathname of the structure file meant to be the input for this task. More...
 
static String getConfirmedFormulaFileName (FragmenterParameters settings, int i)
 Builds the pathname of the structure file meant to hold structures that survive the comparison of structure's elemental analysis against the declared molecular formula. More...
 
static String getPreFilteredFileName (FragmenterParameters settings, int i)
 Builds the pathname of the structure file meant to hold structures that survive the pre-filtering step, if any. More...
 
static String getFragmentsFileName (FragmenterParameters settings, int i)
 Builds the pathname of the structure file meant to hold fragments resulting from this task. More...
 
static String getFragmentsFileName (FragmenterParameters settings)
 Builds the pathname of the structure file meant to hold fragments resulting from all tasks. More...
 
static String getResultsFileName (FragmenterParameters settings)
 Builds the pathname of the structure file meant to hold results that are not necessarily fragments. More...
 

Static Private Member Functions

static String getLogFileName (FragmenterParameters settings, int i)
 Builds the pathname of the log file for this task. More...
 

Private Attributes

File inputFile
 File containing the input for this task (i.e., a structure file) More...
 
File preliminaryResults
 File containing the latest results, though not the final results. More...
 
Logger logger = null
 Logger for this task. More...
 
String logFilePathname = "unset"
 Pathname to thread-specific log. More...
 

Additional Inherited Members

- Public Attributes inherited from denoptim.task.Task
Object lock = new Object()
 Lock for addressing synchronization issues. More...
 

Detailed Description

Task that performs the various steps in the process that prepares chemical structured to be chopped, chops them, and post-process the resulting fragments.

Each of the steps may or may not be part of the actual workflow, depending on the configurations given upon construction of the task. Note that preliminary adaptation of the molecular representations is expected to be done before calling this task. So the systems to fragment should have been already be processed by FragmenterTools#prepareMolToFragmentation(org.openscience.cdk.interfaces.IAtomContainer, FragmenterParameters, int) before starting this task.

Definition at line 46 of file FragmenterTask.java.

Constructor & Destructor Documentation

◆ FragmenterTask()

denoptim.fragmenter.FragmenterTask.FragmenterTask ( File  inputFile,
FragmenterParameters  settings,
int  id 
) throws SecurityException, IOException

Create a task by giving the input file (i.e., containing structures to work with) and the configuration of the task.

Note we start a task-specific logger that prints to a task-specific file.

Parameters
inputFilethe source of structures to work with.
settingsthe configuration of the task.
ididentifier of the thread running this task.
Exceptions
SecurityException
IOException

Definition at line 91 of file FragmenterTask.java.

References denoptim.fragmenter.FragmenterTask.getLogFileName(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.utils.TaskUtils.getUniqueTaskIndex(), denoptim.task.Task.id, denoptim.fragmenter.FragmenterTask.inputFile, denoptim.fragmenter.FragmenterTask.logFilePathname, denoptim.fragmenter.FragmenterTask.logger, and denoptim.fragmenter.FragmenterTask.settings.

Here is the call graph for this function:

Member Function Documentation

◆ call()

◆ getConfirmedFormulaFileName()

static String denoptim.fragmenter.FragmenterTask.getConfirmedFormulaFileName ( FragmenterParameters  settings,
int  i 
)
staticpackage

Builds the pathname of the structure file meant to hold structures that survive the comparison of structure's elemental analysis against the declared molecular formula.

Parameters
settingssettings we work with.
ithe index of the thread
Returns
the pathname

Definition at line 163 of file FragmenterTask.java.

References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.

Referenced by denoptim.fragmenter.FragmenterTask.call().

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

◆ getFragmentsFileName() [1/2]

static String denoptim.fragmenter.FragmenterTask.getFragmentsFileName ( FragmenterParameters  settings)
staticpackage

Builds the pathname of the structure file meant to hold fragments resulting from all tasks.

Parameters
settingssettings we work with.
Returns
the pathname

Definition at line 207 of file FragmenterTask.java.

References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.

Here is the call graph for this function:

◆ getFragmentsFileName() [2/2]

static String denoptim.fragmenter.FragmenterTask.getFragmentsFileName ( FragmenterParameters  settings,
int  i 
)
staticpackage

Builds the pathname of the structure file meant to hold fragments resulting from this task.

Parameters
settingssettings we work with.
ithe index of the thread
Returns
the pathname

Definition at line 193 of file FragmenterTask.java.

References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.

Referenced by denoptim.fragmenter.FragmenterTask.call(), and denoptim.fragmenter.ParallelFragmentationAlgorithm.doPostFlightOperations().

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

◆ getInputFileName()

static String denoptim.fragmenter.FragmenterTask.getInputFileName ( FragmenterParameters  settings,
int  i 
)
staticpackage

Builds the pathname of the structure file meant to be the input for this task.

Parameters
settingssettings we work with.
ithe index of the thread
Returns
the pathname

Definition at line 127 of file FragmenterTask.java.

References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.

Here is the call graph for this function:

◆ getLogFileName()

static String denoptim.fragmenter.FragmenterTask.getLogFileName ( FragmenterParameters  settings,
int  i 
)
staticprivate

Builds the pathname of the log file for this task.

Parameters
settingssettings we work with.
ithe index of the thread
Returns
the pathname

Definition at line 235 of file FragmenterTask.java.

References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.

Referenced by denoptim.fragmenter.FragmenterTask.FragmenterTask().

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

◆ getLogFilePathname()

String denoptim.fragmenter.FragmenterTask.getLogFilePathname ( )
Returns
the pathname of the log file.

Definition at line 138 of file FragmenterTask.java.

References denoptim.fragmenter.FragmenterTask.logFilePathname.

Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.createAndSubmitTasks().

Here is the caller graph for this function:

◆ getPreFilteredFileName()

static String denoptim.fragmenter.FragmenterTask.getPreFilteredFileName ( FragmenterParameters  settings,
int  i 
)
staticpackage

Builds the pathname of the structure file meant to hold structures that survive the pre-filtering step, if any.

Parameters
settingssettings we work with.
ithe index of the thread
Returns
the pathname

Definition at line 178 of file FragmenterTask.java.

References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.

Referenced by denoptim.fragmenter.FragmenterTask.call().

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

◆ getResultFile()

String denoptim.fragmenter.FragmenterTask.getResultFile ( )
Returns
the pathname to the file collecting results

Definition at line 148 of file FragmenterTask.java.

References denoptim.fragmenter.FragmenterTask.results.

◆ getResultsFileName()

static String denoptim.fragmenter.FragmenterTask.getResultsFileName ( FragmenterParameters  settings)
staticpackage

Builds the pathname of the structure file meant to hold results that are not necessarily fragments.

Parameters
settingssettings we work with.
Returns
the pathname

Definition at line 221 of file FragmenterTask.java.

References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.

Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), and denoptim.fragmenter.ParallelFragmentationAlgorithm.doPostFlightOperations().

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

Member Data Documentation

◆ inputFile

File denoptim.fragmenter.FragmenterTask.inputFile
private

File containing the input for this task (i.e., a structure file)

Definition at line 51 of file FragmenterTask.java.

Referenced by denoptim.fragmenter.FragmenterTask.call(), and denoptim.fragmenter.FragmenterTask.FragmenterTask().

◆ logFilePathname

String denoptim.fragmenter.FragmenterTask.logFilePathname = "unset"
private

Pathname to thread-specific log.

Definition at line 77 of file FragmenterTask.java.

Referenced by denoptim.fragmenter.FragmenterTask.FragmenterTask(), and denoptim.fragmenter.FragmenterTask.getLogFilePathname().

◆ logger

Logger denoptim.fragmenter.FragmenterTask.logger = null
private

◆ preliminaryResults

File denoptim.fragmenter.FragmenterTask.preliminaryResults
private

File containing the latest results, though not the final results.

For instance, the results of an intermediate step in the task.

Definition at line 57 of file FragmenterTask.java.

Referenced by denoptim.fragmenter.FragmenterTask.call().

◆ results

String denoptim.fragmenter.FragmenterTask.results = null
protected

The data structure holding the results of this task.

Definition at line 62 of file FragmenterTask.java.

Referenced by denoptim.fragmenter.FragmenterTask.call(), and denoptim.fragmenter.FragmenterTask.getResultFile().

◆ settings


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