Ah,
a singular case of programming laziness.
The program parses coordinates, stopping
when 
tokenize(vs, buffer).size() != 3
however this is wrong, as in the example
  6.29515362457206E+00 -2.43255788376700E+00  1.01738544341254E+01
  5.58007856838859E+00 -3.26245586477436E-02  1.24332273200431E+01
  7.99638633064185E+00  4.79391480902887E-01  1.01358897458248E+01
 Reduced coordinates (xred)
 -3.05505620801227E-13 -3.33333334900465E-01  1.56971916426294E-01
  3.33333334900465E-01  3.05505620801227E-13  1.56971916426294E-01
 -3.33333334899359E-01  3.33333334899359E-01  1.56971916426294E-01
this combines with using atof to receive the number, with no
clue of possible errors.
Since natom directive appears before cartesian coordinates
I would suggest using natom to just read the correct number
of rows.
Also the check for where coordinates start is a bit loose,
it could be easily improved with a regexp, but I see babel
is not linked against a regexp library.
In my outputs cartesian coordinates always have
"(xcart)" in the introducing line, so
---OUTPUT-----------------------------------------------------------------------

 Cartesian coordinates (xcart) [bohr]
 -2.72475664443090E+00 -1.57313898213819E+00  4.44950896807670E+00
  2.72475664443090E+00 -1.57313898213819E+00  4.44950896807670E+00

I think this is the general pattern, though I am not sure.
 
If you agree with the above, I will gladly patch the code.
Fulvio

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to