From: <Koy...@ta...> - 2004-11-26 02:49:34
|
Hello, I am having a trouble with reading a mol2 file using JOElib. The error seems occur when the coordinate entry is negative. For instance, @<TRIPOS>ATOM 1 C1 1.207 2.091 0.000 C.ar 1 BENZENE 0.000 2 C2 2.414 1.394 0.000 C.ar 1 BENZENE 0.000 3 C3 2.414 0.000 0.000 C.ar 1 BENZENE 0.000 4 C4 1.207 -0.697 0.000 C.ar 1 BENZENE 0.000 upto 3rd atom is successfully read yet, 4th atom which has minus in y-coordinate causes throwing an exception (cformat.ScanfMatchException: Malformed floating point number: no digits). This is the (simplified) code I am using. String inputFile="benzene.mol2"; SimpleReader reader = null; IOType inType = IOTypeHolder.instance().filenameToType(inputFile); reader = new SimpleReader(input, inType); JOEMol mol = new JOEMol(inType, inType); reader.readNext(mol)); I will appreciate for your help on this matter. Takahiko Koyama |