Le 13/02/2018 à 22:28, Benjamin Bucior a écrit :
Hi Sébastien,
I have run into similar issues and eventually traced it back to the
ring perception after using a profiler. Unfortunately, the ring
perception can be triggered in unexpected places to avoid internal
inconsistencies. (e.g. copying an OBMol in turn calculates OBAtom
hybridization if not defined, which can quickly become a 95+%
bottleneck in large systems.)
For a use case similar to yours, if you are only interested in the XYZ
coordinates but not bonding information, there may be a simple
workaround. Many of the formats have flags to adjust the input and
output behavior. Caveat: I mostly work with CIFs, but based on the
PDB format page <https://openbabel.org/wiki/PDB> the flags look
similar. You might try adding this line above where you read the file:
conv.AddOption("b", OBConversion::INOPTIONS);
Alternatively, if you are interested in neighbors but not bond orders,
I have had success with the "s" option.
Best regards,
Ben
Hi,
and thank you for your help, all of you,
your solution [ *conv.AddOption("b", OBConversion::INOPTIONS);* ] is
precisely what I was looking for,
not that I can understand what it does, but it does it :-P
I use OpenBabel to read chemistry files, but I am only interested in
atomic coordinates,
my software is fast enough when looking for bonding information, even
for way more than the
3000 atoms in my disordered SiO2 example, and as long as I can get the
coordinates I am fine.
I think all the analysis you are talking about should really be
triggered by the user,
at least at the programmer level anyway, also this information is
relevant and should
be displayed somewhere in the API website, my first though when I tried
to understand
was to look for a diagram of some sort to explain the steps babel was
going through to open a chem file,
so I could find out what was taking so long and maybe the keywords to
trigger each steps,
but I could not find that kind of information ... maybe I did not look
in the right place.
Also this happens not matter the file format, xyz, cif, pdb, obviously
with PDB if bonding information
is stored the process is shorter, but then again should the analysis be
performed even the file does
not contains bonding information ? And if as you mentioned many of the
format have flags,
I was not able to find documentation (in the API website) to see what
flags and how to trigger them.
It happens that I am very familiar with ring statistics and related
algorithms,
is there any way to print out the ring information that Openbabel looked
for during that time
at the opening of the files so I can check exactly what it is, ie. what
kind of rings it
actually is interested in ? ... I could compare that info with bench
from my codes that also look
for rings, to see if I can help to speed up the process ... who knows ...
Anyway again thank you for your help and you reactivity !
And thank you to the Openbabel community for this great tool !
Best regards
Sébastien
===========================================================
Dr. Sébastien Le Roux
Ingénieur de Recherche CNRS
Institut de Physique et Chimie des Matériaux de Strasbourg
Département des Matériaux Organiques
23, rue du Loess
BP 43
F-67034 Strasbourg Cedex 2, France
E-mail: sebastien.ler...@ipcms.unistra.fr
Webpage: http://www-ipcms.u-strasbg.fr/spip.php?article1771
RINGS project: http://rings-code.sourceforge.net/
ISAACS project: http://isaacs.sourceforge.net/
Fax: +33 3 88 10 72 46
Phone: +33 3 88 10 71 62
===========================================================
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss