Re: Copy and Paste 3D Pose [message #1819 is a reply to message #1818] |
Wed, 25 January 2023 15:59 |
nbehrnd
Messages: 224 Registered: June 2019
|
Senior Member |
|
|
Hi Scott,
DataWarrior's window "3D structure" allows (double click on the molecule of interest) to extract a string which includes the molecule's structure (as the sketcher / spread sheet uses) as well as the 3D coordinates. The string may be exported to a text editor as an intermediate storage. Now, the .dwar file equally stores this information, though in a slightly different sequence, which however may be adjusted and can be used to write a new container.dwar.
I gave the idea a spin to construct a small Python script (attached in the .zip below). In an initial test, I let openbabel generate an alkylated pyridine written into a .sdf accessible to DW. If the script processes the string copied from the 3d structure window (export molecule 3D) to write a new container.dwar, the export of this as a .sdf retains the 3D conformation. Yes, there is some difference between the very input structure, and the one eventually exported after this «round trip». Aiming for a quantification e.g., by a Kabsch test (e.g., rmsd in Python, initiated by Jimmy Kromann), the remaining difference between the two files about this small molecule (four single bonds where rotation can change the conformation) is tiny by number. The superposition of the two in Jmol does not reveal a significant difference, either.
For now, this is a sketch which could be developed further.
Norwid
https://github.com/nbehrnd/datawarrior_conformer_export
|
|
|