|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.descriptors.MDParameters
chemaxon.descriptors.ECFPParameters
public class ECFPParameters
Manages ECFP fingerprint parameters. This class reads, stores and provides
parameters for ECFP class. These parameters together are
called the ECFP fingerprint configuration. The native format of such
configuration is XML.
| Field Summary | |
|---|---|
static int |
DEFAULT_DIAMETER
|
static int |
DEFAULT_LENGTH
default values for parameters |
| Constructor Summary | |
|---|---|
ECFPParameters()
Creates an empty object. |
|
ECFPParameters(java.io.File configFile)
Creates a new object based on a given configuration file. |
|
ECFPParameters(java.lang.String XMLconfig)
Creates a new object based on a given configuration string. |
|
| Method Summary | |
|---|---|
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 ecfp)
Calls ECFPGenerator and generates the descriptor for the
given molecule. |
java.lang.String |
getDefaultDocumentFrame()
Get the default XML configuration string. |
static java.lang.String |
getDefaultStandardizerConfiguration()
Gets the default configuration of the standardizer. |
int |
getDiameter()
Gets the preset diameter parameter. |
boolean |
getKeepCounts()
Gets the counts (multiplicity) parameter. |
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 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 ECFP. |
protected void |
readValues(boolean all)
Picks parameter values from the DOM tree. |
void |
setDiameter(int diameter)
Sets the diameter parameter. |
void |
setKeepCounts(boolean keepCounts)
Sets the counts (multiplicity) parameter. |
void |
setLength(int length)
Sets the length (number of cells) of the descriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_LENGTH
public static final int DEFAULT_DIAMETER
| Constructor Detail |
|---|
public ECFPParameters()
public ECFPParameters(java.io.File configFile)
throws MDParametersException
configFile - XML configuration file
MDParametersException - missing or bad XML configuration
public ECFPParameters(java.lang.String XMLconfig)
throws MDParametersException
XMLconfig - XML configuration string
MDParametersException - missing or bad XML configuration| Method Detail |
|---|
public void fromString(java.lang.String parameterString)
throws MDParametersException
fromString in class MDParametersparameterString - parameters in string
MDParametersException - when the parameter string is not well-formed
public void fromFile(java.io.File parameterFile)
throws MDParametersException
fromFile in class MDParametersparameterFile - initialized parameter file
MDParametersException - failed to process parameter file
public void setLength(int length)
throws MDParametersException
MDParameters
setLength in class MDParameterslength - the required length (cell count)
MDParametersException - if argument is not positivepublic void setDiameter(int diameter)
public int getDiameter()
public void setKeepCounts(boolean keepCounts)
keepCounts - counts parameterpublic boolean getKeepCounts()
protected void initGenerator()
throws MDParametersException
MDParametersExceptionprotected void init()
ECFP object stored in
MDParameters.md.
protected void initParameters()
initParameters in class MDParameters
protected java.lang.String[] generate(Molecule m,
MolecularDescriptor ecfp)
throws MDGeneratorException
ECFPGenerator and generates the descriptor for the
given molecule.
m - a molecular structureecfp - the ECFP descriptor generated for the given molecule,
an output parameter
MDGeneratorException - when failed to generate descriptor
protected int getNumberOfWeights(int parametrizedMetricIndex)
throws java.lang.IllegalArgumentException
MolecularDescriptor class or its derived classes, but not
to parametrized metric.
getNumberOfWeights in class MDParametersparametrizedMetricIndex - parametrized metric index
java.lang.IllegalArgumentException - if the given parameter is not a
valid metric indexpublic java.lang.String getDefaultDocumentFrame()
getDefaultDocumentFrame in class MDParameterspublic static java.lang.String getDefaultStandardizerConfiguration()
ECFP includes aromatization.
protected void processDocument(boolean all)
throws MDParametersException
ECFP.
Find the
processDocument in class MDParametersall - indicates if the entire document has to be processed
in which case the existing configuration is overwritten
MDParametersException
protected void readValues(boolean all)
throws MDParametersException
readValues in class MDParametersall - indicates if the entire document has to be processed
in which case the existing configuration is overwritten
MDParametersException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||