Package chemaxon.descriptors
Class RFParameters
java.lang.Object
chemaxon.descriptors.MDParameters
chemaxon.descriptors.RFParameters
Manages reaction fingerprint parameters. This class reads, stores and provides
 parameters for 
ReactionFingerprint class. These parameters together are
 called the reaction fingerprint configuration. The native format of such
 configuration is XML.- Since:
- JChem 3.2
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intdefault values for parametersFields inherited from class chemaxon.descriptors.MDParametersasymmetryFactors, 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 SummaryConstructorsConstructorDescriptionCreates an empty object.RFParameters(File configFile) Creates a new object based on a given configuration file.RFParameters(String XMLconfig) Creates a new object based on a given configuration string.
- 
Method SummaryModifier and TypeMethodDescriptionvoidSets parameters from an XML file.voidfromString(String parameterString) Sets parameters from a string representation.protected String[]generate(Molecule m, MolecularDescriptor md) CallsRFGeneratorand generates the descriptor for the given molecule.intGets the preset bit count (number of fingerprint bits to be set to 1) parameter.intGets the preset path length (number of adjacent bonds) parameter.Get the default XML configuration string.booleanShows if standardization should be applied of not.protected intgetNumberOfWeights(int parametrizedMetricIndex) Gets the number of weight factors used by the specified metric.protected voidinit()This method is called by the constructors before processing the XML configuration.protected voidInitializes the reaction fingerprint generator.protected voidInitializes those data members that depend on the XML configuration but are not directly taken from it.protected voidprocessDocument(boolean all) Processes pars of the XML configuration specific toReactionFingerprint.protected voidreadValues(boolean all) Picks parameters values from the DOM tree.voidsetBitCount(int bitCount) Sets the bit count (number of fingerprint bits to be set to 1) parameter.voidsetBondCount(int bondCount) Sets the path length (number of adjacent bonds) parameter.voidsetEnableStandardization(boolean useStandardization) Sets if standardization is applied.voidsetLength(int length) Sets the length (number of bits) of the reaction fingerprint.Methods inherited from class chemaxon.descriptors.MDParametersaddParameters, 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
- 
Field Details- 
DEFAULT_LENGTHpublic static final int DEFAULT_LENGTHdefault values for parameters- See Also:
 
- 
DEFAULT_BOND_COUNTpublic static final int DEFAULT_BOND_COUNT- See Also:
 
- 
DEFAULT_BITS_SETpublic static final int DEFAULT_BITS_SET- See Also:
 
 
- 
- 
Constructor Details- 
RFParameterspublic RFParameters()Creates an empty object. Initializes parameters to default values.
- 
RFParametersCreates a new object based on a given configuration file.- Parameters:
- configFile- XML configuration file
- Throws:
- MDParametersException- missing or bad XML configuration
 
- 
RFParametersCreates a new object based on a given configuration string.- Parameters:
- XMLconfig- XML configuration string
- Throws:
- MDParametersException- missing or bad XML configuration
 
 
- 
- 
Method Details- 
fromStringSets parameters from a string representation. This method processes an XML format, but derived classes may overload this and define their own format.- Overrides:
- fromStringin class- MDParameters
- Parameters:
- parameterString- parameters in string
- Throws:
- MDParametersException- when the parameter string is not well-formed
 
- 
fromFileSets parameters from an XML file. Derived classes may overload this and define their own format (even other than XML).- Overrides:
- fromFilein class- MDParameters
- Parameters:
- parameterFile- initialized parameter file
- Throws:
- MDParametersException- failed to process parameter file
 
- 
setLengthSets the length (number of bits) of the reaction fingerprint.- Overrides:
- setLengthin class- MDParameters
- Parameters:
- length- number of bits
- Throws:
- MDParametersException- if argument is not multiple of 32
 
- 
setBondCountpublic void setBondCount(int bondCount) Sets the path length (number of adjacent bonds) parameter.- Parameters:
- bondCount- the bond count parameter
 
- 
setBitCountpublic void setBitCount(int bitCount) Sets the bit count (number of fingerprint bits to be set to 1) parameter.- Parameters:
- bitCount- the bit count parameter
 
- 
initGeneratorInitializes the reaction fingerprint generator.- Throws:
- MDParametersException
 
- 
initprotected void init()This method is called by the constructors before processing the XML configuration. It creates aReactionFingerprintobject stored inMDParameters.md.
- 
initParametersprotected void initParameters()Initializes those data members that depend on the XML configuration but are not directly taken from it.- Overrides:
- initParametersin class- MDParameters
 
- 
generateCallsRFGeneratorand generates the descriptor for the given molecule.- Parameters:
- m- a molecular structure
- md- the molecular descriptor generated for the given molecule, an output parameter
- Returns:
- names of Molecule Property-s (SDfile tags) set by the generator
- Throws:
- MDGeneratorException- when failed to generate descriptor
 
- 
getBondCountpublic int getBondCount()Gets the preset path length (number of adjacent bonds) parameter.- Returns:
- the bond count parameter
 
- 
getBitCountpublic int getBitCount()Gets the preset bit count (number of fingerprint bits to be set to 1) parameter.- Returns:
- the bit count parameter
 
- 
getNumberOfWeightsGets the number of weight factors used by the specified metric. This method can be applied to the dissimilarity metrics provided by theMolecularDescriptorclass or its derived classes, but not to parametrized metric.- Overrides:
- getNumberOfWeightsin class- MDParameters
- Parameters:
- parametrizedMetricIndex- parametrized metric index
- Returns:
- number of weights the metric uses
- Throws:
- IllegalArgumentException- if the given parameter is not a valid metric index
 
- 
getDefaultDocumentFrameGet the default XML configuration string. This is needed when the optional ReactionFingerprint XML configuration is not specified.- Overrides:
- getDefaultDocumentFramein class- MDParameters
- Returns:
- default XML configuration string of the RFParameters class
 
- 
processDocumentProcesses pars of the XML configuration specific toReactionFingerprint. Find thenode in the DOM tree and leaves the rest of the work to the parent class. - Overrides:
- processDocumentin class- MDParameters
- Parameters:
- all- indicates if the entire document has to be processed in which case the existing configuration is overwritten
- Throws:
- MDParametersException
 
- 
readValuesPicks parameters values from the DOM tree.- Overrides:
- readValuesin class- MDParameters
- Parameters:
- all- indicates if the entire document has to be processed in which case the existing configuration is overwritten
- Throws:
- MDParametersException
 
- 
setEnableStandardizationpublic void setEnableStandardization(boolean useStandardization) Sets if standardization is applied. As default it is. Disable it in case the standardization/aromatization is already done beforehand.
- 
getEnableStandardizationpublic boolean getEnableStandardization()Shows if standardization should be applied of not. SeesetEnableStandardization(boolean).
 
-