Python scripting internal coordinates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Python scripting internal coordinates

tvery42
Hello,

I am writing a python script using openbabel module.

I would like to generate a new set of coordinates for a molecule by modifying the internal coordinates.

When I convert the new molecule to gzmat or fh, some of the internal coordinates atom definition are modified.

Is it possible to keep the atoms that define the internal coordinatess identical to the original input?

Best regards

Thibaut Very
Reply | Threaded
Open this post in threaded view
|

Re: Python scripting internal coordinates

Geoff Hutchison
> I would like to generate a new set of coordinates for a molecule by
> modifying the internal coordinates.
>
> When I convert the new molecule to gzmat or fh, some of the internal
> coordinates atom definition are modified.

Sure. The default CartesianToInternal method will do re-ordering if it thinks the original atom order creates a bad z-matrix (e.g., co-linear atoms, etc.).

But you can create the z-matrix yourself. The math isn't hard. Calculate the distance from atom 1 to atom 2, the distance between 2-3 and the angle 1-2-3, etc.

Create a set of internal coordinate objects and fill in the parameters, then if needed call InternalToCartesian (which does not re-order atoms).

Hope that helps,
-Geoff


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss