$darkmode
DENOPTIM
|
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...
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... | |
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.
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.
inputFile | the source of structures to work with. |
settings | the configuration of the task. |
id | identifier of the thread running this task. |
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.
Object denoptim.fragmenter.FragmenterTask.call | ( | ) | throws Exception |
Performs the whatever work has to be done by this task.
Definition at line 248 of file FragmenterTask.java.
References denoptim.fragmenter.FragmenterTools.checkElementalAnalysisAgainstFormula(), denoptim.task.Task.completed, denoptim.programs.fragmenter.FragmenterParameters.doCheckFormula(), denoptim.programs.fragmenter.FragmenterParameters.doFiltering, denoptim.programs.fragmenter.FragmenterParameters.doFragmentation, denoptim.programs.fragmenter.FragmenterParameters.doPreFilter(), denoptim.fragmenter.FragmenterTools.filterStrucutresBySMARTS(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.fragmenter.FragmenterTask.getConfirmedFormulaFileName(), denoptim.fragmenter.FragmenterTask.getFragmentsFileName(), denoptim.programs.fragmenter.FragmenterParameters.getNumTasks(), denoptim.fragmenter.FragmenterTask.getPreFilteredFileName(), denoptim.programs.fragmenter.FragmenterParameters.getPreFiltrationSMARTS(), denoptim.fragmenter.FragmenterTask.inputFile, denoptim.fragmenter.FragmenterTask.logger, denoptim.fragmenter.FragmenterTools.manageFragmentCollection(), denoptim.fragmenter.FragmenterTask.preliminaryResults, denoptim.fragmenter.FragmenterTask.results, and denoptim.fragmenter.FragmenterTask.settings.
|
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.
settings | settings we work with. |
i | the index of the thread |
Definition at line 163 of file FragmenterTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.
Referenced by denoptim.fragmenter.FragmenterTask.call().
|
staticpackage |
Builds the pathname of the structure file meant to hold fragments resulting from all tasks.
settings | settings we work with. |
Definition at line 207 of file FragmenterTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.
|
staticpackage |
Builds the pathname of the structure file meant to hold fragments resulting from this task.
settings | settings we work with. |
i | the index of the thread |
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().
|
staticpackage |
Builds the pathname of the structure file meant to be the input for this task.
settings | settings we work with. |
i | the index of the thread |
Definition at line 127 of file FragmenterTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.
|
staticprivate |
Builds the pathname of the log file for this task.
settings | settings we work with. |
i | the index of the thread |
Definition at line 235 of file FragmenterTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.
Referenced by denoptim.fragmenter.FragmenterTask.FragmenterTask().
String denoptim.fragmenter.FragmenterTask.getLogFilePathname | ( | ) |
Definition at line 138 of file FragmenterTask.java.
References denoptim.fragmenter.FragmenterTask.logFilePathname.
Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.createAndSubmitTasks().
|
staticpackage |
Builds the pathname of the structure file meant to hold structures that survive the pre-filtering step, if any.
settings | settings we work with. |
i | the index of the thread |
Definition at line 178 of file FragmenterTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.FragmenterTask.settings.
Referenced by denoptim.fragmenter.FragmenterTask.call().
String denoptim.fragmenter.FragmenterTask.getResultFile | ( | ) |
Definition at line 148 of file FragmenterTask.java.
References denoptim.fragmenter.FragmenterTask.results.
|
staticpackage |
Builds the pathname of the structure file meant to hold results that are not necessarily fragments.
settings | settings we work with. |
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().
|
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().
|
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().
|
private |
Logger for this task.
Definition at line 72 of file FragmenterTask.java.
Referenced by denoptim.fragmenter.FragmenterTask.call(), and denoptim.fragmenter.FragmenterTask.FragmenterTask().
|
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().
|
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().
|
protected |
Settings for the calculation of the fitness.
Definition at line 67 of file FragmenterTask.java.
Referenced by denoptim.fragmenter.FragmenterTask.call(), denoptim.fragmenter.FragmenterTask.FragmenterTask(), denoptim.fragmenter.FragmenterTask.getConfirmedFormulaFileName(), denoptim.fragmenter.FragmenterTask.getFragmentsFileName(), denoptim.fragmenter.FragmenterTask.getInputFileName(), denoptim.fragmenter.FragmenterTask.getLogFileName(), denoptim.fragmenter.FragmenterTask.getPreFilteredFileName(), and denoptim.fragmenter.FragmenterTask.getResultsFileName().