User 955ad06ce5
25-10-2007 10:11:15
i want to convert smiles to finger prints with the code above:
public byte[] convert(String fname){
byte[] barray=null;
String content;
// String fname = "C:/chemDoc/mollib.smiles";
MolImporter importer = null;
Molecule mole = null;
try{
FileReader fr=new FileReader(fname);
BufferedReader br=new BufferedReader(fr);
String XMLconfig = "C:/chemDoc/cfp.xml";
CFParameters params = new CFParameters(new File(XMLconfig));
ChemicalFingerprint cf = new ChemicalFingerprint(params);
importer = new MolImporter();
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
while(true){
content=br.readLine();
if(content == null)
break;
mole = importer.importMol(content);
cf.generate(mole);
byteOut.write(cf.toData());
}
barray = byteOut.toByteArray();
}catch(FileNotFoundException ex){
}catch(IOException ex){
}catch(MDGeneratorException ex){
}
// FileUtil.saveBinFile(barray,"C:/mahmut.bin");
return barray;
}
how can i configure the length of finger prints?
is it possible to convert fingerprints back to a meaningful notation like smiles?
regards.
public byte[] convert(String fname){
byte[] barray=null;
String content;
// String fname = "C:/chemDoc/mollib.smiles";
MolImporter importer = null;
Molecule mole = null;
try{
FileReader fr=new FileReader(fname);
BufferedReader br=new BufferedReader(fr);
String XMLconfig = "C:/chemDoc/cfp.xml";
CFParameters params = new CFParameters(new File(XMLconfig));
ChemicalFingerprint cf = new ChemicalFingerprint(params);
importer = new MolImporter();
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
while(true){
content=br.readLine();
if(content == null)
break;
mole = importer.importMol(content);
cf.generate(mole);
byteOut.write(cf.toData());
}
barray = byteOut.toByteArray();
}catch(FileNotFoundException ex){
}catch(IOException ex){
}catch(MDGeneratorException ex){
}
// FileUtil.saveBinFile(barray,"C:/mahmut.bin");
return barray;
}
how can i configure the length of finger prints?
is it possible to convert fingerprints back to a meaningful notation like smiles?
regards.