User d7e78b975b
11-12-2010 17:04:17
Hello all,
does anybody know how I can get 0/1 values for the chemical fingerprint instead of hashed values?
I use the following Java code:
...
File file = new File("cox2_corina.sdf");
// Set the input file for the generator
File cfpF = new File("cfp.xml");
CFParameters cfpConfig = new CFParameters(cfpF);
ChemicalFingerprint fp = new ChemicalFingerprint( cfpConfig );
// Create a molecular descriptor generator for one descriptor
GenerateMD descript = new GenerateMD(1);
descript.setInput(file.getAbsolutePath());
descript.setSDfileInput(true);
// Specifies applied parameters settings
String[] spl = file.getName().split("\\.");
String cfpFile = file.getParent() + "/" + spl[0] + ".cfp";
// Chemical Fingerprint descriptor
descript.setDescriptor(0, cfpFile, "CF", cfpConfig, "");
// Initialize the generator
descript.init();
// Start it and do the entire generation in one go
descript.run();
// Close output file
descript.close();
....
with the following xml file:
<ChemicalFingerprintConfiguration Version="0.3" schemaLocation="cfp.xsd">
<Parameters Length="1024" BondCount="7" BitCount="3"/>
<StandardizerConfiguration Version="0.1">
<Actions>
<Action ID="aromatize" Act="aromatize"/>
</Actions>
</StandardizerConfiguration>
<ScreeningConfiguration>
<ParametrizedMetrics>
<ParametrizedMetric Name="Tanimoto" ActiveFamily="Generic" Metric="Tanimoto" Threshold="0.2"/>
<ParametrizedMetric Name="Euclidean" ActiveFamily="Generic" Metric="Euclidean" Threshold="15"/>
</ParametrizedMetrics>
</ScreeningConfiguration>
</ChemicalFingerprintConfiguration>
I found another topic (https://www.chemaxon.com/forum/ftopic1653.html) in which this problem is also discussed.
In it is written: "If - for any reason - you really need binary values printed, then you should specify the -2 flag in the command line."
Do I have to change the xml file and include the -2 flag? Or do I have to change this line "descript.setDescriptor(0, cfpFile, "CF", cfpConfig, "");"
Best regards