From: A. S. <oli...@ya...> - 2006-08-09 19:15:22
|
I use OpenBabel Perl Module to parse mol files to a database and by the way I use the following code to obtain smiles format: my $obMol=new Chemistry::OpenBabel::OBMol; my $obConversion=new Chemistry::OpenBabel::OBConversion; $obConversion->SetInAndOutFormats("mol","smi"); $obConversion->ReadString($obMol,$mol_file); my $outSmiles=$obConversion->WriteString($obMol); All works OK, but I obtain sometimes warning messages on screen that make slower the process, I'd like to avoid this messages but I don't know how to do that. An example of the warning messages: *** Open Babel Warning in WriteMolecule 1-[(4-Acetyl-phenylcarbamoyl)-methyl]-pyridinium Proton(s) added/removed With the InChi format I have success avoiding this messages with this code: my $obMol=new Chemistry::OpenBabel::OBMol; my $obConversion=new Chemistry::OpenBabel::OBConversion; $obConversion->SetInAndOutFormats("mol","inchi"); $obConversion->ReadString($obMol,$mol_file); $obConversion->SetOptions("w",1); my $outInchi=$obConversion->WriteString($obMol); I want to know if exists a similar solution for smiles, because the former doen't work ($obConversion->SetOptions("w",1);) Thanks. -- View this message in context: http://www.nabble.com/Open-Babel-Warnings-tf2080646.html#a5731811 Sent from the openbabel-scripting forum at Nabble.com. |