$darkmode
DENOPTIM
|
Class parsing fitness expression by means of Expression Language. More...
Classes | |
class | CustomVariableDefiningContext |
In this context we only need to know that "Variable" is mapped to the class Variable . More... | |
class | VariableDefiningContext |
This is the context on which we read a fitness expression, and parse it to identify all variables in the expression. More... | |
Public Member Functions | |
FitnessExpressionParser () | |
Creates a new parser. More... | |
void | parse (String fitnessExpression, List< String > customVarDescExpressions) throws DENOPTIMException |
Parses the given expressions. More... | |
List< Variable > | getVariables () |
Returns the list of variables in the expression of the fitness. More... | |
List< DescriptorForFitness > | getDescriptors () |
Returns the list of descriptors needed to compute the numerical values of the variables in the expression of the fitness. More... | |
Private Member Functions | |
String[] | makeStringArray (String line) throws DENOPTIMException |
IBitFingerprint | makeIBitFingerprintBySubstructure (String line, String[] smarts) throws DENOPTIMException |
For now we only accept a filename from which we read in a molecule. More... | |
IBitFingerprint | makeIBitFingerprint (String line, IFingerprinter fingerprinter) throws DENOPTIMException |
For now we only accept a filename from which we read in a molecule. More... | |
IFingerprinter | makeIFingerprinter (String classShortName) throws DENOPTIMException |
Private Attributes | |
List< Variable > | variables = new ArrayList<Variable>() |
List of variables used in the calculation of the fitness. 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... | |
Class parsing fitness expression by means of Expression Language.
Definition at line 54 of file FitnessExpressionParser.java.
denoptim.fitness.FitnessExpressionParser.FitnessExpressionParser | ( | ) |
Creates a new parser.
Definition at line 75 of file FitnessExpressionParser.java.
List< DescriptorForFitness > denoptim.fitness.FitnessExpressionParser.getDescriptors | ( | ) |
Returns the list of descriptors needed to compute the numerical values of the variables in the expression of the fitness.
Definition at line 624 of file FitnessExpressionParser.java.
References denoptim.fitness.FitnessExpressionParser.descriptors.
Referenced by denoptim.fitness.FitnessParameters.processParameters().
List< Variable > denoptim.fitness.FitnessExpressionParser.getVariables | ( | ) |
Returns the list of variables in the expression of the fitness.
Definition at line 611 of file FitnessExpressionParser.java.
References denoptim.fitness.FitnessExpressionParser.variables.
|
private |
For now we only accept a filename from which we read in a molecule.
DENOPTIMException |
Definition at line 540 of file FitnessExpressionParser.java.
References denoptim.io.DenoptimIO.readAllAtomContainers().
Referenced by denoptim.fitness.FitnessExpressionParser.makeIBitFingerprintBySubstructure(), and denoptim.fitness.FitnessExpressionParser.parse().
|
private |
For now we only accept a filename from which we read in a molecule.
DENOPTIMException |
Definition at line 527 of file FitnessExpressionParser.java.
References denoptim.fitness.FitnessExpressionParser.makeIBitFingerprint().
Referenced by denoptim.fitness.FitnessExpressionParser.parse().
|
private |
Definition at line 590 of file FitnessExpressionParser.java.
References denoptim.fitness.descriptors.TanimotoMolSimilarity.makeIFingerprinter().
Referenced by denoptim.fitness.FitnessExpressionParser.parse().
|
private |
Definition at line 501 of file FitnessExpressionParser.java.
References denoptim.io.DenoptimIO.readList().
Referenced by denoptim.fitness.FitnessExpressionParser.parse().
void denoptim.fitness.FitnessExpressionParser.parse | ( | String | fitnessExpression, |
List< String > | customVarDescExpressions | ||
) | throws DENOPTIMException |
Parses the given expressions.
Since the value obtained from the calculation of each single descriptor can be used for multiple purposes (i.e., as a proper descriptor and as a component used to calculate the value of more than one variable) we collect the descriptors and record the relation between each descriptor and any variables that depend on it.
fitnessExpression | the expression defining how to calculate the fitness from named variables. |
customVarDescExpressions | the collection of functions defining how to calculate the numerical value of the variables. Any variable that is not defined in this list is assumes to correspond to the value that is calculated by a descriptor implementation reachable in the classpath and offering a descriptor value named after the variable name. E.g., if the fitness expression contains Zagreb , we assume that the descriptor Zagreb can be calculated by a IDescriptor implementation visible in the class path. |
DENOPTIMException |
Definition at line 100 of file FitnessExpressionParser.java.
References denoptim.fitness.DescriptorForFitness.addDependentVariable(), denoptim.fitness.FitnessExpressionParser.descriptors, denoptim.fitness.DescriptorUtils.findAllDescriptorImplementations(), denoptim.fitness.Variable.getDescriptorName(), denoptim.fitness.Variable.getName(), denoptim.fitness.DescriptorForFitness.getShortName(), denoptim.fitness.DescriptorForFitness.implementation, denoptim.fitness.DescriptorForFitness.makeCopy(), denoptim.fitness.FitnessExpressionParser.makeIBitFingerprint(), denoptim.fitness.FitnessExpressionParser.makeIBitFingerprintBySubstructure(), denoptim.fitness.FitnessExpressionParser.makeIFingerprinter(), denoptim.fitness.FitnessExpressionParser.makeStringArray(), denoptim.fitness.Variable.params, and denoptim.fitness.FitnessExpressionParser.variables.
Referenced by 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 67 of file FitnessExpressionParser.java.
Referenced by denoptim.fitness.FitnessExpressionParser.getDescriptors(), and denoptim.fitness.FitnessExpressionParser.parse().
|
private |
List of variables used in the calculation of the fitness.
For instance, atom/bond specific descriptors, and custom parameterized descriptors.
Definition at line 61 of file FitnessExpressionParser.java.
Referenced by denoptim.fitness.FitnessExpressionParser.getVariables(), and denoptim.fitness.FitnessExpressionParser.parse().