$darkmode
DENOPTIM
|
Fragments a list of chemical systems by running parallel fragmentation tasks. More...
Public Member Functions | |
ParallelFragmentationAlgorithm (FragmenterParameters settings) | |
Constructor. More... | |
Public Member Functions inherited from denoptim.task.ParallelAsynchronousTaskExecutor | |
ParallelAsynchronousTaskExecutor (int numberOfTasks, Logger logger) | |
Constructor. More... | |
void | stopRun () |
Stops all subtasks and shutdown executor. More... | |
void | run () throws DENOPTIMException, IOException |
Run the parallelized task. More... | |
Protected Member Functions | |
boolean | doPreFlightOperations () |
void | createAndSubmitTasks () |
Implementations of this method must call the submitTask(Task, String) method to actually send the task to the executor and eventually start it. More... | |
boolean | doPostFlightOperations () |
Protected Member Functions inherited from denoptim.task.ParallelAsynchronousTaskExecutor | |
boolean | subtaskHasException () |
Looks for exceptions in the subtasks and, if any, store its reference locally to allow reporting it back from the main thread. More... | |
Throwable | getExceptionFromSubTask () |
boolean | allTasksCompleted () |
Check for completion of all subtasks. More... | |
void | submitTask (Task task, String logFilePathname) |
abstract void | createAndSubmitTasks () |
Implementations of this method must call the submitTask(Task, String) method to actually send the task to the executor and eventually start it. More... | |
abstract boolean | doPostFlightOperations () |
abstract boolean | doPreFlightOperations () |
Static Protected Member Functions | |
static List< File > | getFilesCollectingIsomorphicFamilyChampions (File workDir) |
Static Package Functions | |
static void | splitInputForThreads (FragmenterParameters settings, IteratingAtomContainerReader reader) |
Splits the input data (from FragmenterParameters ) into batches suitable for parallel batch processing. More... | |
static String | getStructureFileNameBatch (FragmenterParameters settings, int i) |
Builds the pathname of the structure file generated for one of the parallel threads. More... | |
Static Private Member Functions | |
static boolean | getFormulaForMol (IAtomContainer mol, int index, LinkedHashMap< String, String > formulae) |
Takes the molecular formula from the given list of formulae and using the 'Title' property of the index or the molecule. More... | |
Private Attributes | |
File[] | structures |
Collection of files with input. More... | |
FragmenterParameters | settings = null |
All settings controlling the tasks executed by this class. More... | |
Additional Inherited Members | |
Protected Attributes inherited from denoptim.task.ParallelAsynchronousTaskExecutor | |
final List< Object > | results |
List of object returned by completed tasks. More... | |
Package Attributes inherited from denoptim.task.ParallelAsynchronousTaskExecutor | |
final ThreadPoolExecutor | tpe |
Asynchronous tasks manager. More... | |
Fragments a list of chemical systems by running parallel fragmentation tasks.
Definition at line 56 of file ParallelFragmentationAlgorithm.java.
denoptim.fragmenter.ParallelFragmentationAlgorithm.ParallelFragmentationAlgorithm | ( | FragmenterParameters | settings | ) |
Constructor.
Definition at line 76 of file ParallelFragmentationAlgorithm.java.
References denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.fragmenter.FragmenterParameters.getNumTasks(), and denoptim.fragmenter.ParallelFragmentationAlgorithm.settings.
|
protected |
Implementations of this method must call the submitTask(Task, String)
method to actually send the task to the executor and eventually start it.
Reimplemented from denoptim.task.ParallelAsynchronousTaskExecutor.
Definition at line 123 of file ParallelFragmentationAlgorithm.java.
References denoptim.fragmenter.FragmenterTask.getLogFilePathname(), denoptim.programs.fragmenter.FragmenterParameters.getNumTasks(), denoptim.fragmenter.ParallelFragmentationAlgorithm.settings, denoptim.fragmenter.ParallelFragmentationAlgorithm.structures, and denoptim.task.ParallelAsynchronousTaskExecutor.submitTask().
|
protected |
Reimplemented from denoptim.task.ParallelAsynchronousTaskExecutor.
Definition at line 141 of file ParallelFragmentationAlgorithm.java.
References denoptim.io.DenoptimIO.appendTxtFiles(), denoptim.programs.fragmenter.FragmenterParameters.doExtactRepresentativeConformer, denoptim.programs.fragmenter.FragmenterParameters.doFragmentation, denoptim.programs.fragmenter.FragmenterParameters.doManageIsomorphicFamilies, denoptim.fragmenter.ParallelFragmentationAlgorithm.getFilesCollectingIsomorphicFamilyChampions(), denoptim.fragmenter.FragmenterTask.getFragmentsFileName(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.fragmenter.FragmenterParameters.getNumTasks(), denoptim.fragmenter.ParallelConformerExtractionAlgorithm.getResults(), denoptim.fragmenter.FragmenterTask.getResultsFileName(), denoptim.programs.RunTimeParameters.getWorkDirectory(), denoptim.files.FileFormat.MOLSDF, denoptim.task.ParallelAsynchronousTaskExecutor.results, denoptim.task.ParallelAsynchronousTaskExecutor.run(), denoptim.fragmenter.ParallelFragmentationAlgorithm.settings, and denoptim.constants.DENOPTIMConstants.TMPFRAGFILEFORMAT.
|
protected |
Reimplemented from denoptim.task.ParallelAsynchronousTaskExecutor.
Definition at line 84 of file ParallelFragmentationAlgorithm.java.
References denoptim.io.IteratingAtomContainerReader.getIteratorType(), denoptim.programs.fragmenter.FragmenterParameters.getNumTasks(), denoptim.fragmenter.ParallelFragmentationAlgorithm.getStructureFileNameBatch(), denoptim.programs.fragmenter.FragmenterParameters.getStructuresFile(), denoptim.fragmenter.ParallelFragmentationAlgorithm.settings, denoptim.programs.fragmenter.FragmenterParameters.setWorkingIn3D(), denoptim.fragmenter.ParallelFragmentationAlgorithm.splitInputForThreads(), and denoptim.fragmenter.ParallelFragmentationAlgorithm.structures.
|
staticprotected |
Definition at line 259 of file ParallelFragmentationAlgorithm.java.
References denoptim.constants.DENOPTIMConstants.MWSLOTFRAGSFILENAMEROOT, and denoptim.constants.DENOPTIMConstants.MWSLOTFRAGSUNQFILENANEEND.
Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.doPostFlightOperations().
|
staticprivate |
Takes the molecular formula from the given list of formulae and using the 'Title' property of the index or the molecule.
The formula taken from the list in argument is then placed among the properties of the chemical object.
Definition at line 437 of file ParallelFragmentationAlgorithm.java.
References denoptim.constants.DENOPTIMConstants.FORMULASTR.
Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.splitInputForThreads().
|
staticpackage |
Builds the pathname of the structure file generated for one of the parallel threads.
settings | settings we work with. |
i | the index of the thread |
Definition at line 422 of file ParallelFragmentationAlgorithm.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), and denoptim.fragmenter.ParallelFragmentationAlgorithm.settings.
Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.doPreFlightOperations(), denoptim.fragmenter.ParallelFragmentationAlgorithm.splitInputForThreads(), and denoptim.fragmenter.ParallelFragmentationAlgorithmTest.testSplitInputForThreads().
|
staticpackage |
Splits the input data (from FragmenterParameters
) into batches suitable for parallel batch processing.
Since we have to read all the atom containers, we use this chance to do any preparation of the molecular representation (see FragmenterTools#prepareMolToFragmentation(IAtomContainer, FragmenterParameters, int)
) and store the molecular formula in the property DENOPTIMConstants#FORMULASTR
.
DENOPTIMException | |
FileNotFoundException |
Definition at line 307 of file ParallelFragmentationAlgorithm.java.
References denoptim.io.IteratingAtomContainerReader.close(), denoptim.programs.fragmenter.FragmenterParameters.doCheckFormula(), denoptim.programs.fragmenter.FragmenterParameters.getFormulae(), denoptim.fragmenter.ParallelFragmentationAlgorithm.getFormulaForMol(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.fragmenter.FragmenterParameters.getNumTasks(), denoptim.fragmenter.ParallelFragmentationAlgorithm.getStructureFileNameBatch(), denoptim.programs.fragmenter.FragmenterParameters.getStructuresFile(), denoptim.io.IteratingAtomContainerReader.hasNext(), denoptim.io.IteratingAtomContainerReader.next(), denoptim.fragmenter.FragmenterTools.prepareMolToFragmentation(), denoptim.fragmenter.ParallelFragmentationAlgorithm.settings, and denoptim.io.DenoptimIO.writeSDFFile().
Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.doPreFlightOperations(), and denoptim.fragmenter.ParallelFragmentationAlgorithmTest.testSplitInputForThreads().
|
private |
All settings controlling the tasks executed by this class.
Definition at line 67 of file ParallelFragmentationAlgorithm.java.
Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.createAndSubmitTasks(), denoptim.fragmenter.ParallelFragmentationAlgorithm.doPostFlightOperations(), denoptim.fragmenter.ParallelFragmentationAlgorithm.doPreFlightOperations(), denoptim.fragmenter.ParallelFragmentationAlgorithm.getStructureFileNameBatch(), denoptim.fragmenter.ParallelFragmentationAlgorithm.ParallelFragmentationAlgorithm(), and denoptim.fragmenter.ParallelFragmentationAlgorithm.splitInputForThreads().
|
private |
Collection of files with input.
Definition at line 62 of file ParallelFragmentationAlgorithm.java.
Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.createAndSubmitTasks(), and denoptim.fragmenter.ParallelFragmentationAlgorithm.doPreFlightOperations().