$darkmode
DENOPTIM
denoptim.fragmenter.ConformerExtractorTask Class Reference

Task that analyzes an isomorphic family of fragments to identify the most representative fragment (i.e., the champion). More...

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

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< ClusterableFragmentextractClusterableFragments (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< ClusterableFragmentcollectClusterableFragmentsFromFile () 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< ClusterableFragmentsample
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ConformerExtractorTask() [1/2]

denoptim.fragmenter.ConformerExtractorTask.ConformerExtractorTask ( List< Vertex isomorphicFamily,
FragmenterParameters  settings 
) throws SecurityException, IOException

Constructs a task that will analyze the given isomorphic family.

Parameters
isomorphicFamilythe 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.
settingsparameters controlling the job.
Exceptions
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.

Here is the call graph for this function:

◆ ConformerExtractorTask() [2/2]

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).

Parameters
oldChampionsone of the fragments belonging to the isomorphic family to analyze.
settingsparameters controlling the job.
Exceptions
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.

Here is the call graph for this function:

Member Function Documentation

◆ call()

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().

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

◆ collectClusterableFragmentsFromFile()

List< ClusterableFragment > denoptim.fragmenter.ConformerExtractorTask.collectClusterableFragmentsFromFile ( ) throws DENOPTIMException
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.

Returns
Exceptions
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().

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

◆ extractClusterableFragments()

static List< ClusterableFragment > denoptim.fragmenter.ConformerExtractorTask.extractClusterableFragments ( Iterator< IAtomContainer >  reader,
String  isomorphicFamilyId,
Logger  logger 
)
static

Analyzes all the entries provided by the iterator and extracts those that pertain the specified isomorphic family.

Parameters
readerthe iterator providing the input.
isomorphicFamilyIdthe identifier of the isomorphic family to work with.
loggertask dedicated logger.
Returns
a list of fragments where each fragment has a consistent ordering of its atoms/APs that reflects the isomorphic mapping and allows to compare the fragments geometrically.

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().

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

◆ getChosenFragPathname()

static String denoptim.fragmenter.ConformerExtractorTask.getChosenFragPathname ( FragmenterParameters  settings,
String  isomorphicFamilyId 
)
staticpackage

Builds the pathname for the file where we save all the fragments that we found to be closest to each cluster's centroid.

Parameters
settingssettings we work with.
Returns
the pathname

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().

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

◆ getClusterCentroidsPathname()

static String denoptim.fragmenter.ConformerExtractorTask.getClusterCentroidsPathname ( FragmenterParameters  settings,
String  isomorphicFamilyId 
)
staticpackage

Builds the pathname for the file where we save all the centroids of clusters.

Parameters
settingssettings we work with.
Returns
the pathname

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().

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

◆ getClusterPathname()

static String denoptim.fragmenter.ConformerExtractorTask.getClusterPathname ( FragmenterParameters  settings,
String  isomorphicFamilyId,
int  i 
)
staticpackage

Builds the pathname for the file where we save the members of a given cluster.

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

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().

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

◆ getLogFilePathname()

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

Definition at line 194 of file ConformerExtractorTask.java.

References denoptim.fragmenter.ConformerExtractorTask.logFilePathname.

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

Here is the caller graph for this function:

◆ getResultFile()

String denoptim.fragmenter.ConformerExtractorTask.getResultFile ( )
Returns
the pathname to the files collecting results

Definition at line 494 of file ConformerExtractorTask.java.

References denoptim.fragmenter.ConformerExtractorTask.results.

◆ populateListOfClusterizableFragments()

static boolean denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments ( List< ClusterableFragment sample,
Fragment  frag,
Logger  logger,
String  fragId 
)
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.

Parameters
samplethe collection of isomorphic fragments. Can be empty, in which case, we just add the fragment into this list.
fragthe fragment that we try to add to the sample.
loggerwhere any log should be posted.
fragIda string identifying the fragment. Typically the index in a list of fragments.
Returns
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().

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

Member Data Documentation

◆ isoFamMembersFile

File denoptim.fragmenter.ConformerExtractorTask.isoFamMembersFile
private

◆ isomorphicFamilyId

◆ logFilePathname

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

◆ logger

◆ results

String denoptim.fragmenter.ConformerExtractorTask.results = null
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().

◆ sample

◆ settings


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