|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.plugin.CalculatorPlugin
chemaxon.marvin.calculations.logDPlugin
public class logDPlugin
Plugin class for logD calculation.
API usage example:
// instantiate plugin
logDPlugin plugin = new logDPlugin();
// set logP calculation method
plugin.setlogPMethod(METHOD_WEIGHTED);
// set method weights
plugin.setWeightOfMethods(1, 2, 1, 0);
// set parameters
plugin.setCloridIonConcentration(0.2);
plugin.setNaKIonConcentration(0.2);
plugin.setpHLower(3.0);
plugin.setpHUpper(6.0);
plugin.setpHStep(1.0);
MolImporter importer = new MolImporter("targets.sdf");
Molecule mol = null;
while ((mol = importer.read()) != null) {
// set molecule and run calculation
plugin.setMolecule(mol);
plugin.run();
double[] pHs = plugin.getpHs();
double[] logDs = plugin.getlogDs();
// get and print logD values
for (int i=0; i < pHs.length; ++i) {
double pH = pHs[i];
double logD = logDs[i];
System.out.println(pH+", "+logD);
}
}
importer.close();
Another example showing logD calculation at a single pH value:
// instantiate plugin
logDPlugin plugin = new logDPlugin();
// set pH
plugin.setpH(3.0);
// set the input molecule
plugin.setMolecule(mol);
// run the calculation
plugin.run();
// get result
double logD = plugin.getlogD();
// print result
System.out.println("logD at pH 3.0: "+logD);
For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the
Concurrent plugin examples.
| Field Summary | |
|---|---|
static int |
METHOD_KLOP
logP calculation method "KLOP" |
static int |
METHOD_PHYS
logP calculation method: "PHYS" |
static int |
METHOD_USER_DEFINED
User defined logP calculation method |
static int |
METHOD_VG
logP calculation method "VG" |
static int |
METHOD_WEIGHTED
Weighted logP calculation method |
| Fields inherited from class chemaxon.marvin.plugin.CalculatorPlugin |
|---|
ATOM, BLUE, CALCRGB_OFF, COVALENT_HYDRATION_ERROR_REMARK, CRITICAL_ERROR_MSG, EPSILON, INCORRECT_AROMATIC_NITROGEN_REMARK, INSTABLE_TAUTOMERIC_FORM_REMARK, licenseEnvironment, MOLECULE, MOLECULES, NAN, PLUGIN_CLASS_KEY, PLUGIN_DIR, RED |
| Constructor Summary | |
|---|---|
logDPlugin()
Constructor. |
|
| Method Summary | |
|---|---|
double |
calclogD(double pH)
Returns the logD value at fixed pH. |
void |
checkMolecule(Molecule mol)
Checks the input molecule. |
java.lang.String |
getErrorMessage()
Returns the calculation error information message if run()
returned false (calculation error): hydrogen valence error. |
protected Molecule |
getImageMolecule()
Returns the molecule to be used for legend image. |
double |
getlogD()
Returns the logD value for the pH specified in setpH(double). |
double[] |
getlogDs()
Returns the logD array. |
static java.lang.String[] |
getLogPTrainingIds()
Returns the id's of available logP trainings. |
double[] |
getpHs()
Returns the pH array. |
java.lang.String |
getProductName()
Returns the product identifier of the plugin as given by LicenseManager. |
double[] |
getReflogDs()
Returns the reference logD array. |
double[] |
getRefpHs()
Returns the reference pH array. |
java.lang.Object |
getResult(java.lang.Object type,
int index)
Returns the result item for the specified type and index. |
java.lang.Object |
getResult(java.lang.Object type,
java.lang.String arg)
Returns the result item for the specified pH. |
java.lang.String |
getResultAsString(java.lang.Object type,
int index,
java.lang.Object result)
Returns the specified result in String format. |
int |
getResultCount(java.lang.Object type)
Returns the number of result items for the given result key. |
int |
getResultDomain(java.lang.Object type)
Returns the calculation domain CalculatorPlugin.ATOM or
CalculatorPlugin.MOLECULE. |
java.lang.Object[] |
getResultTypes()
Returns the result types. |
boolean |
run()
Runs the logD calculation. |
void |
setCloridIonConcentration(double c)
Sets the Cl- concentration (default: 0.1). |
void |
setConsiderTautomerization(boolean considerTautomerization)
Sets to consider tautomerization in calculation. |
protected void |
setInputMolecule(Molecule mol)
Sets the input molecule. |
void |
setlogPMethod(int method)
Sets the logP calculation method. |
void |
setLogPTrainingId(java.lang.String trainingId)
Sets the user defined logP training. |
void |
setNaKIonConcentration(double c)
Sets the Na+, K+ concentration (default: 0.1). |
void |
setParameters(java.util.Properties params)
Sets the input parameters for the plugin. |
void |
setpH(double pH)
Sets a single pH value for the logD calculation. |
void |
setpHLower(double lower)
Sets pH lower limit (default: 0.0). |
void |
setpHStep(double step)
Sets pH step to be taken between the pH lower and upper limits (default: 1.0). |
void |
setpHUpper(double upper)
Sets pH upper limit (default: 14.0). |
void |
setpKaCorrectionLibrary(java.lang.String correctionLibraryId)
Sets the pKa correction library. |
void |
setWeightOfMethods(double wVG,
double wKLOP,
double wPHYS,
double wUSER)
Sets the weight of logP calculation methods. |
void |
standardize(Molecule mol)
Standardizes the molecule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int METHOD_VG
public static final int METHOD_KLOP
public static final int METHOD_PHYS
public static final int METHOD_USER_DEFINED
public static final int METHOD_WEIGHTED
| Constructor Detail |
|---|
public logDPlugin()
| Method Detail |
|---|
public java.lang.String getProductName()
LicenseManager.
getProductName in class CalculatorPluginLicenseManager.PARTITIONING_PLUGIN_GROUP
public void setParameters(java.util.Properties params)
throws PluginException
setParameters in class CalculatorPluginparams - is the parameter table
PluginException - on errorpublic void setCloridIonConcentration(double c)
Cl- concentration (default: 0.1).
c - is the concentrationpublic void setNaKIonConcentration(double c)
Na+, K+ concentration (default: 0.1).
c - is the concentrationpublic void setpHLower(double lower)
0.0).
lower - is the pH lower limitpublic void setpHUpper(double upper)
14.0).
upper - is the pH upper limitpublic void setpHStep(double step)
1.0).
step - is the pH steppublic void setpH(double pH)
pH - is the pH valuepublic void setConsiderTautomerization(boolean considerTautomerization)
false.
considerTautomerization - if true the calculation will be performed
considering tautomerization and resonance
public void checkMolecule(Molecule mol)
throws PluginException
RxnMolecule,
if the molecule contains R-groups or if the molecule consists of
more than one fragments.
checkMolecule in class CalculatorPluginmol - is the input molecule
PluginException - with error message for the user if the molecule is refused
protected void setInputMolecule(Molecule mol)
throws PluginException
setInputMolecule in class CalculatorPluginmol - is the (standardized) input molecule
PluginException - on errorpublic void setlogPMethod(int method)
METHOD_WEIGHTED.
method - is the logP calculation methodsetWeightOfMethods(double, double, double, double)
public void setWeightOfMethods(double wVG,
double wKLOP,
double wPHYS,
double wUSER)
METHOD_VG method = 1
METHOD_KLOP method = 1
METHOD_PHYS method = 1
METHOD_USER_DEFINED method = 0
METHOD_WEIGHTED method.
wVG - weight of METHOD_VG methodwKLOP - weight of METHOD_KLOP methodwPHYS - weight of METHOD_PHYS methodwUSER - weight of METHOD_USER_DEFINED methodsetlogPMethod(int)public static java.lang.String[] getLogPTrainingIds()
public void setLogPTrainingId(java.lang.String trainingId)
throws PluginException
trainingId - the logP training id
PluginException - if training id is invalid, or parameter file for training cannot be loadedpublic void setpKaCorrectionLibrary(java.lang.String correctionLibraryId)
correctionLibraryId - is the pKa correction library identifier
public boolean run()
throws PluginException
run in class CalculatorPluginPluginException - on errorCalculatorPlugin.getErrorMessage()public java.lang.String getErrorMessage()
run()
returned false (calculation error): hydrogen valence error.
getErrorMessage in class CalculatorPlugin
public double calclogD(double pH)
throws PluginException
pH - is the pH value
PluginException - on errorpublic java.lang.Object[] getResultTypes()
getResultTypes in class CalculatorPluginpublic double[] getRefpHs()
public double[] getReflogDs()
public double getlogD()
setpH(double).
public double[] getpHs()
public double[] getlogDs()
public int getResultDomain(java.lang.Object type)
CalculatorPlugin.ATOM or
CalculatorPlugin.MOLECULE.
logD returns CalculatorPlugin.MOLECULE.
getResultDomain in class CalculatorPlugintype - is the result type
CalculatorPlugin.MOLECULECalculatorPlugin.getResultTypes()public int getResultCount(java.lang.Object type)
1.
getResultCount in class CalculatorPlugintype - is the result type
CalculatorPlugin.getResultTypes()
public java.lang.Object getResult(java.lang.Object type,
int index)
throws PluginException
(pH, logD) arrays as
a double[2][] with the 0-th element being the pH
array and the 1-st element being the logD array.
getResult in class CalculatorPlugintype - is the result type: "logD" or "reflogD"index - is the result index
PluginException - if the result cannot be returnedCalculatorPlugin.getResultTypes()
public java.lang.Object getResult(java.lang.Object type,
java.lang.String arg)
throws PluginException
getResult in class CalculatorPlugintype - is the result type (not used)arg - is the pH as string
PluginException - if the result cannot be returnedCalculatorPlugin.getResultTypes()
public java.lang.String getResultAsString(java.lang.Object type,
int index,
java.lang.Object result)
throws PluginException
(pH, logD) value pairs in string format:
the values are rounded using the 'precision' input parameter
that determines the number of fractional digits displayed,
pH and logD are separated by a tab character.
getResultAsString in class CalculatorPlugintype - is the result typeindex - is the result indexresult - is the result item
PluginException - if an invalid result item is given
protected Molecule getImageMolecule()
throws PluginException
PluginException - on errorpublic void standardize(Molecule mol)
standardize in class CalculatorPluginmol - is the molecule to be standardized
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||