You can check (I am not at my terminal right now) but I think a more
helpful answer is that its the same order as heavy atoms in the SMILES
format left to right, top to bottom. Heavy atoms then corresponding
hydrogen atoms are separated into blocks.

Again, run a few tests, but if this is so the atoms are ordered according
to the same rules as SMILES, which are not particularly rational and will
change unpredictably if the structure changes even a little.

Best,

Peter



On Thu, 4 Feb 2021 at 13:57, Noel O'Boyle <baoille...@gmail.com> wrote:

> It's the order of the atoms in the OBMol's vector of OBAtoms.
>
> On Thu, 4 Feb 2021 at 12:54, Matt Bone <matthew.b...@bristol.ac.uk> wrote:
>
>> Dear OpenBabel,
>>
>> What determines the atom order in the XYZ files written by
>> OpenBabel/Avogadro? It appears there is some logical pattern behind it, but
>> I can't figure it out from the files. I've picked through xyzformat.cpp but
>> that calls a general molecule class that I haven't been able to understand.
>> I'd like to know the logic behind the ordering for some software I'm
>> writing, is this order likely to change with newer versions of OpenBabel?
>>
>> Kind Regards,
>>
>> Matt
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
-- 
Peter Jarowski, Ph. D.
CEO / Co-founder
ChemAlive SA - Quantum Chemistry for All

Twitter: @SAChemAlive <https://twitter.com/SAChemAlive>
LinkedIn: https://www.linkedin.com/company/chemalive-sa/
Web: http://www.chemalive.com

Try our Interface: https://www.app.chemalive.com
<https://demo.chemalive.com/>

<http://www.chemalive.com/C/interfaceC.html>
MassChallenge Switzerland <http://switzerland.masschallenge.org/> Gold
Winners
Stage 3 Climate-KIC <http://www.climate-kic.org/> Winners
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to