@PublicAPI public class RFParameters extends MDParameters
ReactionFingerprint
class. These parameters together are
called the reaction fingerprint configuration. The native format of such
configuration is XML.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BITS_SET |
static int |
DEFAULT_BOND_COUNT |
static int |
DEFAULT_LENGTH
default values for parameters
|
asymmetryFactors, cellSize, cellwiseWeights, configFilePath, currentMetricIndex, data, decForm, DEFAULT_ASYMMETRY_FACTOR, DEFAULT_OUTPUT_PRECISION, DEFAULT_SCALE_FACTOR, DEFAULT_WEIGHT, defaultWeight, document, internalSize, length, md, metricIndexes, normalized, outputPrecision, parametrizedMetricNodes, parametrizedMetrics, parametrizedMetricsNode, scaleFactors, screeningConfigurationNode, similarityNode, standardizer, standardizerConfigurationNode, thresholds, tverskyA, tverskyB, weights
Constructor and Description |
---|
RFParameters()
Creates an empty object.
|
RFParameters(java.io.File configFile)
Creates a new object based on a given configuration file.
|
RFParameters(java.lang.String XMLconfig)
Creates a new object based on a given configuration string.
|
Modifier and Type | Method and Description |
---|---|
void |
fromFile(java.io.File parameterFile)
Sets parameters from an XML file.
|
void |
fromString(java.lang.String parameterString)
Sets parameters from a string representation.
|
protected java.lang.String[] |
generate(Molecule m,
MolecularDescriptor md)
Calls
RFGenerator and generates the descriptor for the
given molecule. |
int |
getBitCount()
Gets the preset bit count (number of fingerprint bits to be set to 1)
parameter.
|
int |
getBondCount()
Gets the preset path length (number of adjacent bonds) parameter.
|
java.lang.String |
getDefaultDocumentFrame()
Get the default XML configuration string.
|
boolean |
getEnableStandardization()
Shows if standardization should be applied of not.
|
protected int |
getNumberOfWeights(int parametrizedMetricIndex)
Gets the number of weight factors used by the specified metric.
|
protected void |
init()
This method is called by the constructors before processing the XML
configuration.
|
protected void |
initGenerator()
Initializes the reaction fingerprint generator.
|
protected void |
initParameters()
Initializes those data members that depend on the XML configuration but
are not directly taken from it.
|
protected void |
processDocument(boolean all)
Processes pars of the XML configuration specific to
ReactionFingerprint . |
protected void |
readValues(boolean all)
Picks parameters values from the DOM tree.
|
void |
setBitCount(int bitCount)
Sets the bit count (number of fingerprint bits to be set to 1) parameter.
|
void |
setBondCount(int bondCount)
Sets the path length (number of adjacent bonds) parameter.
|
void |
setEnableStandardization(boolean useStandardization)
Sets if standardization is applied.
|
void |
setLength(int length)
Sets the length (number of bits) of the reaction fingerprint.
|
addParameters, addParameters, addParametrizedMetric, addParametrizedMetricNode, addParametrizedMetricsNode, appendParametrizedMetric, checkDocumentVersion, getAsymmetryFactor, getCellSize, getCurrentMetricIndex, getData, getDecForm, getDefaultStandardizerConfiguration, getDescriptorTypeName, getInternalMetricIndex, getInternalSize, getLength, getMetricIndex, getMetricName, getMetricName, getNumberOfMetrics, getNumberOfWeights, getScaleFactor, getScalingHypothesis, getScreeningConfigurationString, getThreshold, getThreshold, getTverskyAlpha, getTverskyBeta, getWeights, importNodes, isAsymmetric, isCellwiseWeights, isNormalized, isScaled, isStandardizationMandatory, isWeighted, readFromXmlFile, readFromXmlString, readMetricParameters, readMetricWeights, setAsymmetryFactor, setCellSize, setCellwiseWeights, setCreateStatistics, setCurrentParametrizedMetric, setNormalized, setOutputPrecision, setParameters, setParameters, setScaleFactor, setScalingHypothesis, setThreshold, setWeights, standardize, toString, toString, writeMetricParameter
public static final int DEFAULT_LENGTH
public static final int DEFAULT_BOND_COUNT
public static final int DEFAULT_BITS_SET
public RFParameters()
public RFParameters(java.io.File configFile) throws MDParametersException
configFile
- XML configuration fileMDParametersException
- missing or bad XML configurationpublic RFParameters(java.lang.String XMLconfig) throws MDParametersException
XMLconfig
- XML configuration stringMDParametersException
- missing or bad XML configurationpublic void fromString(java.lang.String parameterString) throws MDParametersException
fromString
in class MDParameters
parameterString
- parameters in stringMDParametersException
- when the parameter string is not well-formedpublic void fromFile(java.io.File parameterFile) throws MDParametersException
fromFile
in class MDParameters
parameterFile
- initialized parameter fileMDParametersException
- failed to process parameter filepublic void setLength(int length) throws MDParametersException
setLength
in class MDParameters
length
- number of bitsMDParametersException
- if argument is not multiple of 32public void setBondCount(int bondCount)
bondCount
- the bond count parameterpublic void setBitCount(int bitCount)
bitCount
- the bit count parameterprotected void initGenerator() throws MDParametersException
MDParametersException
protected void init()
ReactionFingerprint
object stored in
MDParameters.md
.protected void initParameters()
initParameters
in class MDParameters
protected java.lang.String[] generate(Molecule m, MolecularDescriptor md) throws MDGeneratorException
RFGenerator
and generates the descriptor for the
given molecule.m
- a molecular structuremd
- the molecular descriptor generated for the given molecule,
an output parameterMDGeneratorException
- when failed to generate descriptorpublic int getBondCount()
public int getBitCount()
protected int getNumberOfWeights(int parametrizedMetricIndex) throws java.lang.IllegalArgumentException
MolecularDescriptor
class or its derived classes, but not
to parametrized metric.getNumberOfWeights
in class MDParameters
parametrizedMetricIndex
- parametrized metric indexjava.lang.IllegalArgumentException
- if the given parameter is not a
valid metric indexpublic java.lang.String getDefaultDocumentFrame()
getDefaultDocumentFrame
in class MDParameters
protected void processDocument(boolean all) throws MDParametersException
ReactionFingerprint
.
Find the processDocument
in class MDParameters
all
- indicates if the entire document has to be processed
in which case the existing configuration is overwrittenMDParametersException
protected void readValues(boolean all) throws MDParametersException
readValues
in class MDParameters
all
- indicates if the entire document has to be processed
in which case the existing configuration is overwrittenMDParametersException
public void setEnableStandardization(boolean useStandardization)
useStandardization
- public boolean getEnableStandardization()
setEnableStandardization(boolean)
.