openbabel / openbabel

Open Babel is a chemical toolbox designed to speak the many languages of chemical data.
http://openbabel.org/
GNU General Public License v2.0
1.01k stars 403 forks source link

Coordinates marked as 2D/3D #403

Closed openbabel-bot closed 7 years ago

openbabel-bot commented 21 years ago

Since a molecule can contain multiple "conformers," each coordinate set should be marked as 2D or 3D. This would allow access to only a 2D representation or a 3D representation. Or for file formats like CML which allow storing both 2D and 3D coordinates, both could be output.

(Of course this would actually give much greater flexibilty than currently available in CML, but the API should be a superset of chemical ontology.)

As requested by PMR.

-Geoff

Reported by: @ghutchis

openbabel-bot commented 21 years ago

Logged In: YES user_id=21420

As an alternative solution, the API now specifies a "preferred" 2D and/or 3D conformer. So for example, the "preferred" 3D conformer would be the lowest energy in a geometry optimization, etc.

-Geoff

Original comment by: @ghutchis

openbabel-bot commented 20 years ago

Logged In: YES user_id=21420

This is now a bug. The current method of dealing w/2D molecules prevents running ConnectTheDots and PerceiveBondOrders, etc. on 2D structures, but 3D structures that are, in fact, flat are not handled correctly.

So structures must be marked as 2D/3D correctly or this will continue to become a bigger problem.

-Geoff

Original comment by: @ghutchis

openbabel-bot commented 19 years ago

Logged In: YES user_id=21420

OBMol now has methods for getting/setting dimensionality and this is respected by ConnectTheDots, PerceiveBondOrders and other methods. It currently does not have support for marking the dimensionality of conformers or a "preferred" 2D or 3D conformer. But there are currently few formats that store both 2D and 3D coords -- and with the new OBConversion framework, the appropriate dimensionality can be picked by the user.

-Geoff

Original comment by: @ghutchis