$darkmode
DENOPTIM
|
Settings defining the calculation of fitness. More...
Public Member Functions | |
FitnessParameters () | |
Constructor. More... | |
boolean | useExternalFitness () |
boolean | makePictures () |
boolean | make3dTree () |
boolean | checkPreFitnessUID () |
String | getExternalFitnessProvider () |
Gets the pathname of the external executable file. More... | |
String | getExternalFitnessProviderInterpreter () |
Gets the interpreter used to run the external fitness provider. More... | |
String | getFitnessExpression () |
List< DescriptorForFitness > | getDescriptors () |
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 |
Processes all parameters and initialize related objects. More... | |
String | getPrintedList () |
Returns the list of parameters in a string with newline characters as delimiters. More... | |
boolean | writeCandidatesOnDisk () |
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... | |
Private Attributes | |
boolean | useExternalFitness = true |
Flag indication we want to use external fitness provider. More... | |
String | externalExe = "" |
Pathname of an external fitness provider executable. More... | |
String | interpreterExternalExe = "bash" |
Interpreter for the external fitness provider. More... | |
String | fitnessExpression = "" |
Formulation of the internally provided fitness. More... | |
List< String > | customVarDescExpressions |
List of custom variable definitions read from input. More... | |
List< DescriptorForFitness > | descriptors |
The list of descriptors needed to calculate the variables that are used to calculate the fitness with the internal fitness provider. More... | |
boolean | makePictures = false |
Flag controlling production of png graphics for each candidate. More... | |
boolean | make3DTrees = true |
Flag requesting the generation of a 3d-tree model instead of a plain collection of 3d building blocks. More... | |
boolean | checkPreFitnessUID = true |
Flag requesting to test for uniqueness of a candidate based on the unique identifier (UID) generated by conversion of the graph into a molecular entity. More... | |
boolean | checkPreFitnessUIDFromInput = false |
Flag recording that we have explicitly expressed the choice of checkPreFitnessUID. More... | |
boolean | writeCandidatesOnDisk = true |
Flag requesting to write a file that collects all info on an evaluated candidate, i.e., the "FIT" file, even in case of internal fitness. More... | |
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... | |
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, RunTimeParameters > | otherParameters |
Collection of other parameters by type. More... | |
Settings defining the calculation of fitness.
Definition at line 35 of file FitnessParameters.java.
denoptim.fitness.FitnessParameters.FitnessParameters | ( | ) |
Constructor.
Definition at line 115 of file FitnessParameters.java.
References denoptim.programs.RunTimeParameters.ParametersType.FIT_PARAMS.
void denoptim.fitness.FitnessParameters.checkParameters | ( | ) | throws DENOPTIMException |
Evaluate consistency of input parameters.
DENOPTIMException |
Reimplemented from denoptim.programs.RunTimeParameters.
Definition at line 259 of file FitnessParameters.java.
References denoptim.files.FileUtils.checkExists(), denoptim.programs.RunTimeParameters.checkOtherParameters(), and denoptim.fitness.FitnessParameters.externalExe.
boolean denoptim.fitness.FitnessParameters.checkPreFitnessUID | ( | ) |
true
if we want to check the unique identifier (UID) of candidates prior to submitting them to the fitness provider. Definition at line 161 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.checkPreFitnessUID.
List< DescriptorForFitness > denoptim.fitness.FitnessParameters.getDescriptors | ( | ) |
Definition at line 204 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.descriptors.
Referenced by denoptim.task.FitnessTask.runInternalFitness(), denoptim.fitness.FitnessProviderTest.testGetConstantFitness(), denoptim.fitness.FitnessProviderTest.testGetFitnessWithParametrizedDescriptors(), and denoptim.fitness.FitnessExpressionParserTest.testProcessExpressions().
String denoptim.fitness.FitnessParameters.getExternalFitnessProvider | ( | ) |
Gets the pathname of the external executable file.
Definition at line 172 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.externalExe.
Referenced by denoptim.task.FitnessTask.runExternalFitness().
String denoptim.fitness.FitnessParameters.getExternalFitnessProviderInterpreter | ( | ) |
Gets the interpreter used to run the external fitness provider.
Definition at line 183 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.interpreterExternalExe.
Referenced by denoptim.task.FitnessTask.runExternalFitness().
String denoptim.fitness.FitnessParameters.getFitnessExpression | ( | ) |
Definition at line 194 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.fitnessExpression.
Referenced by denoptim.task.FitnessTask.runInternalFitness(), denoptim.fitness.FitnessProviderTest.testGetConstantFitness(), and denoptim.fitness.FitnessProviderTest.testGetFitnessWithParametrizedDescriptors().
String denoptim.fitness.FitnessParameters.getPrintedList | ( | ) |
Returns the list of parameters in a string with newline characters as delimiters.
Reimplemented from denoptim.programs.RunTimeParameters.
Definition at line 295 of file FitnessParameters.java.
References denoptim.programs.RunTimeParameters.NL, denoptim.programs.RunTimeParameters.otherParameters, and denoptim.programs.RunTimeParameters.paramTypeName().
void denoptim.fitness.FitnessParameters.interpretKeyword | ( | String | key, |
String | value | ||
) | throws DENOPTIMException |
Processes a keyword/value pair and assign the related parameters.
key | the keyword as string |
value | the value as a string |
DENOPTIMException | is the parameter cannot be configured from the given value. |
Reimplemented from denoptim.programs.RunTimeParameters.
Definition at line 211 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.checkPreFitnessUID, denoptim.fitness.FitnessParameters.checkPreFitnessUIDFromInput, denoptim.fitness.FitnessParameters.customVarDescExpressions, denoptim.fitness.FitnessParameters.externalExe, denoptim.fitness.FitnessParameters.fitnessExpression, denoptim.fitness.FitnessParameters.interpreterExternalExe, denoptim.fitness.FitnessParameters.make3DTrees, denoptim.fitness.FitnessParameters.makePictures, denoptim.programs.RunTimeParameters.readYesNoTrueFalse(), denoptim.fitness.FitnessParameters.useExternalFitness, and denoptim.fitness.FitnessParameters.writeCandidatesOnDisk.
Referenced by denoptim.fitness.FitnessProviderTest.testGetConstantFitness(), denoptim.fitness.FitnessProviderTest.testGetFitnessWithParametrizedDescriptors(), and denoptim.fitness.FitnessExpressionParserTest.testProcessExpressions().
boolean denoptim.fitness.FitnessParameters.make3dTree | ( | ) |
true
if we are asked to make a tree-like 3d molecular model prior fitness evaluation. The model is built by aligning 3d-building blocks to the attachment point vectors, so there is no energy refinement. Definition at line 150 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.make3DTrees.
Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), and denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call().
boolean denoptim.fitness.FitnessParameters.makePictures | ( | ) |
true
if generation of the candidate's picture is required. Definition at line 137 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.makePictures.
void denoptim.fitness.FitnessParameters.processParameters | ( | ) | throws DENOPTIMException |
Processes all parameters and initialize related objects.
DENOPTIMException |
Reimplemented from denoptim.programs.RunTimeParameters.
Definition at line 273 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.checkPreFitnessUID, denoptim.fitness.FitnessParameters.checkPreFitnessUIDFromInput, denoptim.fitness.FitnessParameters.customVarDescExpressions, denoptim.fitness.FitnessParameters.descriptors, denoptim.fitness.FitnessParameters.fitnessExpression, denoptim.fitness.FitnessExpressionParser.getDescriptors(), denoptim.fitness.FitnessExpressionParser.parse(), denoptim.programs.RunTimeParameters.processOtherParameters(), and denoptim.fitness.FitnessParameters.useExternalFitness.
Referenced by denoptim.fitness.FitnessProviderTest.testGetConstantFitness(), denoptim.fitness.FitnessProviderTest.testGetFitnessWithParametrizedDescriptors(), and denoptim.fitness.FitnessExpressionParserTest.testProcessExpressions().
boolean denoptim.fitness.FitnessParameters.useExternalFitness | ( | ) |
true
if we are asked to execute an external fitness provider. Definition at line 126 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.useExternalFitness.
boolean denoptim.fitness.FitnessParameters.writeCandidatesOnDisk | ( | ) |
true
if we are asked to write on disk every candidate that has been evaluated. Definition at line 326 of file FitnessParameters.java.
References denoptim.fitness.FitnessParameters.writeCandidatesOnDisk.
|
private |
Flag requesting to test for uniqueness of a candidate based on the unique identifier (UID) generated by conversion of the graph into a molecular entity.
Definition at line 92 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.checkPreFitnessUID(), denoptim.fitness.FitnessParameters.interpretKeyword(), and denoptim.fitness.FitnessParameters.processParameters().
|
private |
Flag recording that we have explicitly expressed the choice of checkPreFitnessUID.
Definition at line 98 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.interpretKeyword(), and denoptim.fitness.FitnessParameters.processParameters().
|
private |
List of custom variable definitions read from input.
These lines are the definition of atom/bond specific descriptors, and custom parametrised descriptors.
Definition at line 62 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.interpretKeyword(), and denoptim.fitness.FitnessParameters.processParameters().
|
private |
The list of descriptors needed to calculate the variables that are used to calculate the fitness with the internal fitness provider.
Definition at line 69 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.getDescriptors(), and denoptim.fitness.FitnessParameters.processParameters().
|
private |
Pathname of an external fitness provider executable.
Definition at line 45 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.checkParameters(), denoptim.fitness.FitnessParameters.getExternalFitnessProvider(), and denoptim.fitness.FitnessParameters.interpretKeyword().
|
private |
Formulation of the internally provided fitness.
Definition at line 55 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.getFitnessExpression(), denoptim.fitness.FitnessParameters.interpretKeyword(), and denoptim.fitness.FitnessParameters.processParameters().
|
private |
Interpreter for the external fitness provider.
Definition at line 50 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.getExternalFitnessProviderInterpreter(), and denoptim.fitness.FitnessParameters.interpretKeyword().
|
private |
Flag requesting the generation of a 3d-tree model instead of a plain collection of 3d building blocks.
In the latter, the coordinated of each fragment are not changed when building the molecular representation that is sent to the fitness provider. Setting this to true
asks for roto-translation of each fragment, but does not perform any energy-driven refinement of the geometry.
Definition at line 85 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.interpretKeyword(), and denoptim.fitness.FitnessParameters.make3dTree().
|
private |
Flag controlling production of png graphics for each candidate.
Definition at line 75 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.interpretKeyword(), denoptim.fitness.FitnessParameters.makePictures(), and denoptim.task.FitnessTask.runFitnessProvider().
|
private |
Flag indication we want to use external fitness provider.
Definition at line 40 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.interpretKeyword(), denoptim.fitness.FitnessParameters.processParameters(), denoptim.task.FitnessTask.runFitnessProvider(), and denoptim.fitness.FitnessParameters.useExternalFitness().
|
private |
Flag requesting to write a file that collects all info on an evaluated candidate, i.e., the "FIT" file, even in case of internal fitness.
When this is true
, we write one file for each evaluated candidate. Note that in case of external fitness provider this file is created by the external fitness provider and this flag has no effect.
Definition at line 107 of file FitnessParameters.java.
Referenced by denoptim.fitness.FitnessParameters.interpretKeyword(), denoptim.task.FitnessTask.runFitnessProvider(), and denoptim.fitness.FitnessParameters.writeCandidatesOnDisk().