$darkmode
DENOPTIM
denoptim.fragspace.FragmentSpaceParameters Class Reference

Parameters defining the fragment space. More...

Inheritance diagram for denoptim.fragspace.FragmentSpaceParameters:
[legend]
Collaboration diagram for denoptim.fragspace.FragmentSpaceParameters:
[legend]

Public Member Functions

 FragmentSpaceParameters ()
 Constructor. More...
 
 FragmentSpaceParameters (FragmentSpace fs)
 Constructor of a default set of parameters coupled with a given fragment space. More...
 
int getMaxHeavyAtom ()
 
int getMaxRotatableBond ()
 
double getMaxMW ()
 
boolean enforceSymmetry ()
 
boolean symmetryConstraints ()
 
String getRotSpaceDefFile ()
 
String getPathnameToAppendedFragments ()
 
String getPathnameToAppendedScaffolds ()
 
FragmentSpace getFragmentSpace ()
 
void interpretKeyword (String key, String value) throws DENOPTIMException
 Processes a keyword/value pair and assign the related parameters. More...
 
void checkParameters () throws DENOPTIMException
 Evaluate consistency of input parameters. More...
 
void processParameters () throws DENOPTIMException
 Read the information collected in the parameters stored in this class and create the fragment space accordingly. More...
 
String getPrintedList ()
 Returns the list of parameters in a string with newline characters as delimiters. More...
 
void setFragmentSpace (FragmentSpace fragmentSpace)
 Sets the fragment space linked to these parameters. More...
 
- Public Member Functions inherited from denoptim.programs.RunTimeParameters
 RunTimeParameters (ParametersType paramType)
 Constructor. More...
 
String paramTypeName ()
 Returns a string defining the type the parameters collected here. More...
 
String getWorkDirectory ()
 Gets the pathname to the working directory. More...
 
void setWorkDirectory (String pathname)
 Gets the pathname to the working directory. More...
 
String getLogFilePathname ()
 Gets the pathname to the log file. More...
 
void setLogFilePathname (String pathname)
 Sets the pathname to the log file. More...
 
Logger getLogger ()
 Get the name of the program specific logger. More...
 
Logger startProgramSpecificLogger (String loggerIdentifier) throws SecurityException, IOException
 Starts a logger with the given name. More...
 
Logger startProgramSpecificLogger (String loggerIdentifier, boolean toLogFile) throws SecurityException, IOException
 Starts a logger with the given name. More...
 
Logger startConsoleLogger (String loggerIdentifier)
 Starts a program-specific logger that prints to System.err stream. More...
 
int getVerbosity ()
 Returns the level of verbosity, i.e., the amount of log that we want to print. More...
 
void setVerbosity (int l)
 Set the level of verbosity. More...
 
Randomizer getRandomizer ()
 Returns the current program-specific randomizer. More...
 
long getRandomSeed ()
 Returns the seed. More...
 
void setRandomizer (Randomizer rng)
 Sets the randomizer. More...
 
Randomizer startRandomizer ()
 Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions. More...
 
Randomizer startRandomizer (long seed)
 Starts a program specific randomizer, i.e., a tool for generating random numbers and taking random decisions. More...
 
void readParameterFile (String infile) throws DENOPTIMException
 Read the parameter TXT file line by line and interpret its content. More...
 
void readParameterLine (String line) throws DENOPTIMException
 
boolean containsParameters (ParametersType type)
 
RunTimeParameters getParameters (ParametersType type)
 
void setParameters (RunTimeParameters otherParams)
 
void interpretKeyword (String line) throws DENOPTIMException
 Processes a string looking for keyword and a possibly associated value. More...
 
abstract void interpretKeyword (String key, String value) throws DENOPTIMException
 Processes a keyword/value pair and assign the related parameters. More...
 
abstract void checkParameters () throws DENOPTIMException
 Evaluate consistency of input parameters. More...
 
abstract void processParameters () throws DENOPTIMException
 Processes all parameters and initialize related objects. More...
 
abstract String getPrintedList ()
 Returns the list of parameters in a string with newline characters as delimiters. More...
 
void printParameters ()
 Print all parameters. More...
 

Protected Attributes

String scaffoldLibFile = ""
 Pathname of the file containing the molecular representation of building blocks: scaffolds section - fragments that can be used as seed to grow a new molecule. More...
 
String fragmentLibFile = ""
 PathName of the file containing the molecular representation of building blocks: fragment section - fragments for general use. More...
 
String cappingLibFile = ""
 Pathname of the file containing the molecular representation of building blocks: capping group section - fragments with only one attachment point used to saturate unused attachment points on a graph. More...
 
String compMatrixFile = ""
 Pathname of the file containing the compatibility matrix, bond order to AP-class relation, and forbidden ends list. More...
 
String rcCompMatrixFile = ""
 Pathname of the file containing the RC-compatibility matrix. More...
 
String rotBndsFile = ""
 Rotatable bonds definition file. More...
 
int maxHeavyAtom = 100
 Maximum number of heavy (non-hydrogen) atoms accepted. More...
 
int maxRotatableBond = 20
 Maximum number of rotatable bonds accepted. More...
 
double maxMW = 500
 Maximum molecular weight accepted. More...
 
boolean enforceSymmetry = false
 Flag enforcing constitutional symmetry. More...
 
boolean symmetryConstraints = false
 Flag for application of selected constitutional symmetry constraints. More...
 
- Protected Attributes inherited from denoptim.programs.RunTimeParameters
boolean isMaster = true
 Flag signaling this is the master collection of parameters. More...
 
String workDir = System.getProperty("user.dir")
 Working directory. More...
 
String logFile = "unset"
 Log file. More...
 
int verbosity = 0
 Verbosity level for logger. More...
 
Map< ParametersType, RunTimeParametersotherParameters
 Collection of other parameters by type. More...
 

Private Member Functions

 FragmentSpaceParameters (ParametersType paramType)
 Constructor. More...
 

Private Attributes

HashMap< APClass, Double > symmConstraintsMap
 List of constitutional symmetry constraints. More...
 
FragmentSpace buildingBlocksSpace = null
 

Additional Inherited Members

- Static Public Member Functions inherited from denoptim.programs.RunTimeParameters
static boolean readYesNoTrueFalse (String s)
 Reads a string searching for any common way to say either yes/true (including shorthand t/y) or no/false (including shorthand f/n either). More...
 
- Public Attributes inherited from denoptim.programs.RunTimeParameters
final String NL = System.getProperty("line.separator")
 New line character. More...
 
- Protected Member Functions inherited from denoptim.programs.RunTimeParameters
void checkOtherParameters () throws DENOPTIMException
 Checks any of the parameter collections contained in this instance. More...
 
void processOtherParameters () throws DENOPTIMException
 Processes any of the parameter collections contained in this instance. More...
 
void ensureFileExistsIfSet (String pathname)
 Ensures a pathname is not empty nor null and that it does lead to an existing file or triggers an error. More...
 
void ensureFileExists (String pathname)
 Ensures a pathname does lead to an existing file or triggers an error. More...
 
void ensureNotNull (String paramName, String param, String paramKey)
 Ensures that a parameter is not null or triggers an error. More...
 
void ensureIsPositive (String paramName, int value, String paramKey)
 Ensures that a parameter is a positive number (x>=0) or triggers an error. More...
 
void ensureIsPositiveOrZero (String paramName, int value, String paramKey)
 Ensures that a parameter is a positive number (x>=0) or triggers an error. More...
 
void ensureInRange (String paramName, int value, int min, int max, String paramKey)
 Ensures that a parameter is within a range or triggers an error. More...
 

Detailed Description

Parameters defining the fragment space.

Author
Marco Foscato

Definition at line 38 of file FragmentSpaceParameters.java.

Constructor & Destructor Documentation

◆ FragmentSpaceParameters() [1/3]

denoptim.fragspace.FragmentSpaceParameters.FragmentSpaceParameters ( ParametersType  paramType)
private

Constructor.

Definition at line 115 of file FragmentSpaceParameters.java.

References denoptim.programs.RunTimeParameters.paramType.

◆ FragmentSpaceParameters() [2/3]

denoptim.fragspace.FragmentSpaceParameters.FragmentSpaceParameters ( )

◆ FragmentSpaceParameters() [3/3]

denoptim.fragspace.FragmentSpaceParameters.FragmentSpaceParameters ( FragmentSpace  fs)

Constructor of a default set of parameters coupled with a given fragment space.

Parameters
fs

Definition at line 137 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.buildingBlocksSpace, and denoptim.programs.RunTimeParameters.ParametersType.FS_PARAMS.

Member Function Documentation

◆ checkParameters()

void denoptim.fragspace.FragmentSpaceParameters.checkParameters ( ) throws DENOPTIMException

Evaluate consistency of input parameters.

Exceptions
DENOPTIMException

Reimplemented from denoptim.programs.RunTimeParameters.

Definition at line 336 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.cappingLibFile, denoptim.files.FileUtils.checkExists(), denoptim.programs.RunTimeParameters.checkOtherParameters(), denoptim.fragspace.FragmentSpaceParameters.compMatrixFile, denoptim.fragspace.FragmentSpaceParameters.fragmentLibFile, denoptim.programs.RunTimeParameters.getLogger(), denoptim.fragspace.FragmentSpaceParameters.rcCompMatrixFile, denoptim.fragspace.FragmentSpaceParameters.rotBndsFile, and denoptim.fragspace.FragmentSpaceParameters.scaffoldLibFile.

Referenced by denoptim.gui.FSParamsDialog.makeFragSpace().

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

◆ enforceSymmetry()

boolean denoptim.fragspace.FragmentSpaceParameters.enforceSymmetry ( )

◆ getFragmentSpace()

FragmentSpace denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace ( )

Definition at line 203 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.buildingBlocksSpace.

Referenced by denoptim.ga.GraphOperations.attachFragmentInClosableChain(), denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.buildGraph(), denoptim.graph.DGraph.checkConsistency(), denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel(), denoptim.ga.GraphOperations.extendGraph(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.FitnessEvaluationTask(), denoptim.ga.EAUtils.foundForbiddenEnd(), denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask(), denoptim.graph.DGraph.hasForbiddenEnd(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.gui.FSParamsDialog.makeFragSpace(), denoptim.fragspace.FragsCombinationIterator.next(), denoptim.ga.OffspringEvaluationTask.OffspringEvaluationTask(), denoptim.ga.EAUtils.performFBCC(), denoptim.ga.GraphOperations.performMutation(), denoptim.ga.Population.Population(), denoptim.programs.genetweeker.GeneOpsRunner.runProgram(), denoptim.programs.grapheditor.GraphEditor.runProgram(), denoptim.ga.EAUtils.setupRings(), denoptim.combinatorial.CombinatorialExplorerByLayer.startNewGraphFromScaffold(), denoptim.ga.PopulationTest.testClone(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToScaffoldLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingOnlyAddedOnce(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragmentsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragsWithAPClass(), denoptim.fragspace.FragmentSpaceTest.testSymmetry(), denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates(), and denoptim.ga.PopulationTest.testXOverCompatibility().

Here is the caller graph for this function:

◆ getMaxHeavyAtom()

int denoptim.fragspace.FragmentSpaceParameters.getMaxHeavyAtom ( )

Definition at line 145 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.maxHeavyAtom.

Referenced by denoptim.graph.DGraph.checkConsistency(), and denoptim.ga.GraphOperations.extendGraph().

Here is the caller graph for this function:

◆ getMaxMW()

double denoptim.fragspace.FragmentSpaceParameters.getMaxMW ( )

Definition at line 159 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.maxMW.

Referenced by denoptim.graph.DGraph.checkConsistency().

Here is the caller graph for this function:

◆ getMaxRotatableBond()

int denoptim.fragspace.FragmentSpaceParameters.getMaxRotatableBond ( )

Definition at line 152 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.maxRotatableBond.

Referenced by denoptim.graph.DGraph.checkConsistency().

Here is the caller graph for this function:

◆ getPathnameToAppendedFragments()

String denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedFragments ( )

◆ getPathnameToAppendedScaffolds()

String denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedScaffolds ( )

◆ getPrintedList()

String denoptim.fragspace.FragmentSpaceParameters.getPrintedList ( )

Returns the list of parameters in a string with newline characters as delimiters.

Returns
the list of parameters in a string with newline characters as delimiters.

Reimplemented from denoptim.programs.RunTimeParameters.

Definition at line 425 of file FragmentSpaceParameters.java.

References denoptim.programs.RunTimeParameters.NL, denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.paramTypeName().

Here is the call graph for this function:

◆ getRotSpaceDefFile()

String denoptim.fragspace.FragmentSpaceParameters.getRotSpaceDefFile ( )

Definition at line 180 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.rotBndsFile.

Referenced by denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets().

Here is the caller graph for this function:

◆ interpretKeyword()

◆ processParameters()

void denoptim.fragspace.FragmentSpaceParameters.processParameters ( ) throws DENOPTIMException

Read the information collected in the parameters stored in this class and create the fragment space accordingly.

Exceptions
DENOPTIMException

Reimplemented from denoptim.programs.RunTimeParameters.

Definition at line 408 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.buildingBlocksSpace, denoptim.fragspace.FragmentSpaceParameters.cappingLibFile, denoptim.fragspace.FragmentSpaceParameters.compMatrixFile, denoptim.fragspace.FragmentSpaceParameters.fragmentLibFile, denoptim.programs.RunTimeParameters.processOtherParameters(), denoptim.fragspace.FragmentSpaceParameters.rcCompMatrixFile, denoptim.fragspace.FragmentSpaceParameters.scaffoldLibFile, and denoptim.fragspace.FragmentSpaceParameters.symmConstraintsMap.

Referenced by denoptim.gui.FSParamsDialog.makeFragSpace().

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

◆ setFragmentSpace()

void denoptim.fragspace.FragmentSpaceParameters.setFragmentSpace ( FragmentSpace  fragmentSpace)

Sets the fragment space linked to these parameters.

This method should be used only in unit test to by-pass the creation of a FragmentSpace from parameters.

Parameters
fragmentSpace

Definition at line 458 of file FragmentSpaceParameters.java.

References denoptim.fragspace.FragmentSpaceParameters.buildingBlocksSpace.

Referenced by denoptim.fragspace.FragmentSpace.define().

Here is the caller graph for this function:

◆ symmetryConstraints()

boolean denoptim.fragspace.FragmentSpaceParameters.symmetryConstraints ( )

Member Data Documentation

◆ buildingBlocksSpace

◆ cappingLibFile

String denoptim.fragspace.FragmentSpaceParameters.cappingLibFile = ""
protected

Pathname of the file containing the molecular representation of building blocks: capping group section - fragments with only one attachment point used to saturate unused attachment points on a graph.

Definition at line 59 of file FragmentSpaceParameters.java.

Referenced by denoptim.fragspace.FragmentSpaceParameters.checkParameters(), denoptim.fragspace.FragmentSpaceParameters.interpretKeyword(), and denoptim.fragspace.FragmentSpaceParameters.processParameters().

◆ compMatrixFile

String denoptim.fragspace.FragmentSpaceParameters.compMatrixFile = ""
protected

Pathname of the file containing the compatibility matrix, bond order to AP-class relation, and forbidden ends list.

Definition at line 65 of file FragmentSpaceParameters.java.

Referenced by denoptim.fragspace.FragmentSpaceParameters.checkParameters(), denoptim.fragspace.FragmentSpaceParameters.interpretKeyword(), and denoptim.fragspace.FragmentSpaceParameters.processParameters().

◆ enforceSymmetry

◆ fragmentLibFile

String denoptim.fragspace.FragmentSpaceParameters.fragmentLibFile = ""
protected

◆ maxHeavyAtom

int denoptim.fragspace.FragmentSpaceParameters.maxHeavyAtom = 100
protected

Maximum number of heavy (non-hydrogen) atoms accepted.

Definition at line 80 of file FragmentSpaceParameters.java.

Referenced by denoptim.fragspace.FragmentSpaceParameters.getMaxHeavyAtom(), and denoptim.fragspace.FragmentSpaceParameters.interpretKeyword().

◆ maxMW

double denoptim.fragspace.FragmentSpaceParameters.maxMW = 500
protected

◆ maxRotatableBond

int denoptim.fragspace.FragmentSpaceParameters.maxRotatableBond = 20
protected

◆ rcCompMatrixFile

String denoptim.fragspace.FragmentSpaceParameters.rcCompMatrixFile = ""
protected

◆ rotBndsFile

String denoptim.fragspace.FragmentSpaceParameters.rotBndsFile = ""
protected

◆ scaffoldLibFile

String denoptim.fragspace.FragmentSpaceParameters.scaffoldLibFile = ""
protected

Pathname of the file containing the molecular representation of building blocks: scaffolds section - fragments that can be used as seed to grow a new molecule.

Definition at line 45 of file FragmentSpaceParameters.java.

Referenced by denoptim.fragspace.FragmentSpaceParameters.checkParameters(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedScaffolds(), denoptim.fragspace.FragmentSpaceParameters.interpretKeyword(), and denoptim.fragspace.FragmentSpaceParameters.processParameters().

◆ symmConstraintsMap

HashMap<APClass, Double> denoptim.fragspace.FragmentSpaceParameters.symmConstraintsMap
private
Initial value:
=
new HashMap<APClass, Double>()

List of constitutional symmetry constraints.

Definition at line 105 of file FragmentSpaceParameters.java.

Referenced by denoptim.fragspace.FragmentSpaceParameters.interpretKeyword(), and denoptim.fragspace.FragmentSpaceParameters.processParameters().

◆ symmetryConstraints

boolean denoptim.fragspace.FragmentSpaceParameters.symmetryConstraints = false
protected

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