$darkmode
DENOPTIM
|
Task that analyzes an isomorphic family of fragments to identify the most representative fragment (i.e., the champion). More...
Public Member Functions | |
ConformerExtractorTask (List< Vertex > isomorphicFamily, FragmenterParameters settings) throws SecurityException, IOException | |
Constructs a task that will analyze the given isomorphic family. More... | |
ConformerExtractorTask (Vertex oldChampions, FragmenterParameters settings) throws SecurityException, IOException | |
Constructs a task that will analyze the isomorphic family of the given fragment. More... | |
String | getLogFilePathname () |
Object | call () throws Exception |
String | getResultFile () |
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) |
Static Public Member Functions | |
static List< ClusterableFragment > | extractClusterableFragments (Iterator< IAtomContainer > reader, String isomorphicFamilyId, Logger logger) |
Analyzes all the entries provided by the iterator and extracts those that pertain the specified isomorphic family. More... | |
static boolean | populateListOfClusterizableFragments (List< ClusterableFragment > sample, Fragment frag, Logger logger, String fragId) |
Tries to add a fragment into a sample of isomorphic fragments. More... | |
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 | getClusterPathname (FragmenterParameters settings, String isomorphicFamilyId, int i) |
Builds the pathname for the file where we save the members of a given cluster. More... | |
static String | getClusterCentroidsPathname (FragmenterParameters settings, String isomorphicFamilyId) |
Builds the pathname for the file where we save all the centroids of clusters. More... | |
static String | getChosenFragPathname (FragmenterParameters settings, String isomorphicFamilyId) |
Builds the pathname for the file where we save all the fragments that we found to be closest to each cluster's centroid. More... | |
Private Member Functions | |
List< ClusterableFragment > | collectClusterableFragmentsFromFile () throws DENOPTIMException |
Collects the clusterable fragments from the disk. More... | |
Private Attributes | |
String | isomorphicFamilyId = null |
Identifier of the isomorphic family this task deals with. More... | |
File | isoFamMembersFile |
File collecting (among others) the sampled members of the isomorphic family. More... | |
List< ClusterableFragment > | sample |
List of fragments defining an isomorphic family to analyse. 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 analyzes an isomorphic family of fragments to identify the most representative fragment (i.e., the champion).
The champion is extracted as the result of this task so that it is made available for further usage.
Definition at line 57 of file ConformerExtractorTask.java.
denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask | ( | List< Vertex > | isomorphicFamily, |
FragmenterParameters | settings | ||
) | throws SecurityException, IOException |
Constructs a task that will analyze the given isomorphic family.
isomorphicFamily | the fragments belonging to the isomorphic family to analyze. We do check for isomorphism and keep only the fragments that have an isomorphism with the first fragment in this list. |
settings | parameters controlling the job. |
SecurityException | |
IOException |
Definition at line 106 of file ConformerExtractorTask.java.
References denoptim.programs.RunTimeParameters.getLogger(), denoptim.utils.TaskUtils.getUniqueTaskIndex(), denoptim.fragmenter.ConformerExtractorTask.logger, denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments(), denoptim.fragmenter.ConformerExtractorTask.sample, and denoptim.fragmenter.ConformerExtractorTask.settings.
denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask | ( | Vertex | oldChampions, |
FragmenterParameters | settings | ||
) | throws SecurityException, IOException |
Constructs a task that will analyze the isomorphic family of the given fragment.
We expect to find the rest of its family in filenames conventionally names according to FragmenterParameters#getMWSlotFileNameAllFrags(String)
.
oldChampions | one of the fragments belonging to the isomorphic family to analyze. |
settings | parameters controlling the job. |
SecurityException | |
IOException |
Definition at line 143 of file ConformerExtractorTask.java.
References denoptim.programs.RunTimeParameters.getLogger(), denoptim.programs.fragmenter.FragmenterParameters.getMWSlotFileNameAllFrags(), denoptim.fragmenter.FragmenterTools.getMWSlotIdentifier(), denoptim.programs.fragmenter.FragmenterParameters.getMWSlotSize(), denoptim.utils.TaskUtils.getUniqueTaskIndex(), denoptim.programs.RunTimeParameters.getWorkDirectory(), denoptim.fragmenter.ConformerExtractorTask.isoFamMembersFile, denoptim.constants.DENOPTIMConstants.ISOMORPHICFAMILYID, denoptim.fragmenter.ConformerExtractorTask.isomorphicFamilyId, denoptim.fragmenter.ConformerExtractorTask.logFilePathname, denoptim.fragmenter.ConformerExtractorTask.logger, and denoptim.fragmenter.ConformerExtractorTask.settings.
Object denoptim.fragmenter.ConformerExtractorTask.call | ( | ) | throws Exception |
Definition at line 202 of file ConformerExtractorTask.java.
References denoptim.fragmenter.FragmentClusterer.cluster(), denoptim.fragmenter.ConformerExtractorTask.collectClusterableFragmentsFromFile(), denoptim.task.Task.completed, denoptim.fragmenter.ConformerExtractorTask.getChosenFragPathname(), denoptim.fragmenter.FragmentClusterer.getClusterCentroids(), denoptim.fragmenter.ConformerExtractorTask.getClusterCentroidsPathname(), denoptim.fragmenter.ConformerExtractorTask.getClusterPathname(), denoptim.fragmenter.FragmentClusterer.getNearestToClusterCentroids(), denoptim.fragmenter.FragmenterTask.getResultsFileName(), denoptim.fragmenter.FragmentClusterer.getTransformedClusters(), denoptim.fragmenter.ConformerExtractorTask.isoFamMembersFile, denoptim.fragmenter.ConformerExtractorTask.isomorphicFamilyId, denoptim.programs.fragmenter.FragmenterParameters.isSaveClustersOfConformerToFile(), denoptim.programs.fragmenter.FragmenterParameters.isStandaloneFragmentClustering, denoptim.programs.fragmenter.FragmenterParameters.isUseCentroidsAsRepresentativeConformer(), denoptim.fragmenter.ConformerExtractorTask.logger, denoptim.fragmenter.ConformerExtractorTask.results, denoptim.fragmenter.ConformerExtractorTask.sample, denoptim.fragmenter.ConformerExtractorTask.settings, denoptim.files.FileFormat.VRTXSDF, and denoptim.io.DenoptimIO.writeVertexesToFile().
Referenced by denoptim.programs.fragmenter.Fragmenter.runProgram().
|
private |
Collects the clusterable fragments from the disk.
These fragments are fragment with a list having a consistent ordering of the atoms/APs, so that such order can be used to calculate RMSD between fragments.
DENOPTIMException |
Definition at line 271 of file ConformerExtractorTask.java.
References denoptim.fragmenter.ConformerExtractorTask.extractClusterableFragments(), denoptim.fragmenter.ConformerExtractorTask.isoFamMembersFile, denoptim.fragmenter.ConformerExtractorTask.isomorphicFamilyId, and denoptim.fragmenter.ConformerExtractorTask.logger.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call().
|
static |
Analyzes all the entries provided by the iterator and extracts those that pertain the specified isomorphic family.
reader | the iterator providing the input. |
isomorphicFamilyId | the identifier of the isomorphic family to work with. |
logger | task dedicated logger. |
Definition at line 318 of file ConformerExtractorTask.java.
References denoptim.constants.DENOPTIMConstants.ISOMORPHICFAMILYID, denoptim.fragmenter.ConformerExtractorTask.isomorphicFamilyId, denoptim.fragmenter.ConformerExtractorTask.logger, denoptim.programs.fragmenter.FragmenterParameters.MAXISOMORPHICSAMPLESIZE, denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments(), denoptim.fragmenter.ConformerExtractorTask.sample, and denoptim.graph.Vertex.BBType.UNDEFINED.
Referenced by denoptim.fragmenter.ConformerExtractorTask.collectClusterableFragmentsFromFile(), and denoptim.fragmenter.ConformerExtractorTaskTest.testExtractClusterableFragments().
|
staticpackage |
Builds the pathname for the file where we save all the fragments that we found to be closest to each cluster's centroid.
settings | settings we work with. |
Definition at line 482 of file ConformerExtractorTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), denoptim.fragmenter.ConformerExtractorTask.isomorphicFamilyId, and denoptim.fragmenter.ConformerExtractorTask.settings.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call().
|
staticpackage |
Builds the pathname for the file where we save all the centroids of clusters.
settings | settings we work with. |
Definition at line 467 of file ConformerExtractorTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), denoptim.fragmenter.ConformerExtractorTask.isomorphicFamilyId, and denoptim.fragmenter.ConformerExtractorTask.settings.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call().
|
staticpackage |
Builds the pathname for the file where we save the members of a given cluster.
settings | settings we work with. |
i | the index of the cluster |
Definition at line 452 of file ConformerExtractorTask.java.
References denoptim.programs.RunTimeParameters.getWorkDirectory(), denoptim.fragmenter.ConformerExtractorTask.isomorphicFamilyId, and denoptim.fragmenter.ConformerExtractorTask.settings.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call().
String denoptim.fragmenter.ConformerExtractorTask.getLogFilePathname | ( | ) |
Definition at line 194 of file ConformerExtractorTask.java.
References denoptim.fragmenter.ConformerExtractorTask.logFilePathname.
Referenced by denoptim.fragmenter.ParallelConformerExtractionAlgorithm.createAndSubmitTasks().
String denoptim.fragmenter.ConformerExtractorTask.getResultFile | ( | ) |
Definition at line 494 of file ConformerExtractorTask.java.
References denoptim.fragmenter.ConformerExtractorTask.results.
|
static |
Tries to add a fragment into a sample of isomorphic fragments.
Looks for an isomorphism to define a consistent ordering of FragIsomorphNode
that allows clustering of fragments.
sample | the collection of isomorphic fragments. Can be empty, in which case, we just add the fragment into this list. |
frag | the fragment that we try to add to the sample. |
logger | where any log should be posted. |
fragId | a string identifying the fragment. Typically the index in a list of fragments. |
true
if the fragment has been added to the sample of false
if no isomorphism could be found and, therefore, the fragment is not added to the sample. Definition at line 400 of file ConformerExtractorTask.java.
References denoptim.fragmenter.ClusterableFragment.getJGraphFragIsomorphism(), denoptim.fragmenter.FragmentAlignement.getLowestRMSDMapping(), denoptim.fragmenter.ConformerExtractorTask.logger, denoptim.fragmenter.ConformerExtractorTask.sample, and denoptim.fragmenter.ClusterableFragment.setOrderOfNodes().
Referenced by denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), and denoptim.fragmenter.ConformerExtractorTask.extractClusterableFragments().
|
private |
File collecting (among others) the sampled members of the isomorphic family.
Definition at line 68 of file ConformerExtractorTask.java.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), denoptim.fragmenter.ConformerExtractorTask.collectClusterableFragmentsFromFile(), and denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask().
|
private |
Identifier of the isomorphic family this task deals with.
Definition at line 62 of file ConformerExtractorTask.java.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), denoptim.fragmenter.ConformerExtractorTask.collectClusterableFragmentsFromFile(), denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), denoptim.fragmenter.ConformerExtractorTask.extractClusterableFragments(), denoptim.fragmenter.ConformerExtractorTask.getChosenFragPathname(), denoptim.fragmenter.ConformerExtractorTask.getClusterCentroidsPathname(), and denoptim.fragmenter.ConformerExtractorTask.getClusterPathname().
|
private |
Pathname to thread-specific log.
Definition at line 93 of file ConformerExtractorTask.java.
Referenced by denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), and denoptim.fragmenter.ConformerExtractorTask.getLogFilePathname().
|
private |
Logger for this task.
Definition at line 88 of file ConformerExtractorTask.java.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), denoptim.fragmenter.ConformerExtractorTask.collectClusterableFragmentsFromFile(), denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), denoptim.fragmenter.ConformerExtractorTask.extractClusterableFragments(), and denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments().
|
protected |
The data structure holding the results of this task.
Definition at line 78 of file ConformerExtractorTask.java.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), and denoptim.fragmenter.ConformerExtractorTask.getResultFile().
|
private |
List of fragments defining an isomorphic family to analyse.
Definition at line 73 of file ConformerExtractorTask.java.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), denoptim.fragmenter.ConformerExtractorTask.extractClusterableFragments(), and denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments().
|
protected |
Settings for the calculation of the fitness.
Definition at line 83 of file ConformerExtractorTask.java.
Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask(), denoptim.fragmenter.ConformerExtractorTask.getChosenFragPathname(), denoptim.fragmenter.ConformerExtractorTask.getClusterCentroidsPathname(), and denoptim.fragmenter.ConformerExtractorTask.getClusterPathname().