openmolecules.org

 
Home » DataWarrior » Functionality » Copy and Paste 3D Pose
Copy and Paste 3D Pose [message #1803] Sun, 08 January 2023 06:59 Go to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
If I have given DW docking poses (SDF input), can I simply copy and paste it from DW while preserving the original coordinates? How?
Re: Copy and Paste 3D Pose [message #1804 is a reply to message #1803] Sun, 08 January 2023 19:25 Go to previous messageGo to next message
nbehrnd is currently offline  nbehrnd
Messages: 224
Registered: June 2019
Senior Member
In case you use a three-button mouse, right-click on the cell (table view) opens a pull-down menu to paste a structure (.mol previously read into the RAM of the computer). By recollection, the coordinates are not 1:1 the ones you copied from the mol file when reading the numbers, but distances/angles between them are retained.

Norwid
Re: Copy and Paste 3D Pose [message #1805 is a reply to message #1804] Tue, 10 January 2023 04:24 Go to previous messageGo to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
I'm looking to copy the 3D coords from DW into another program. So, I right click on the structure in DW (as you describe) -->

And try copying it as either 'Molfile v3' or '3D-Structure' but neither gives the 3D coords.

Is there another way?
Re: Copy and Paste 3D Pose [message #1806 is a reply to message #1805] Tue, 10 January 2023 08:27 Go to previous messageGo to next message
nbehrnd is currently offline  nbehrnd
Messages: 224
Registered: June 2019
Senior Member
I think you refer to the (interactive) structure display which shows e.g., the superposition of conformers. One can pick one molecule at a time from this one (right click on the molecule of interest when it no longer uses the CPK colors, but is uniform turquoise), however the representation (possibly) is the 2D/3D idcode string only (the format equally used internally in the .dwar file. To best of my current knowledge, this window does not yet allow the direct export of one, or about all the molecules displayed as .sdf. I'm going to perform some additional tests during the day.*)

Norwid

* I once suggested to openbabel to add reading/exporting DW's idcodes. So far, the incentive was not convincing / attractive enough (https://github.com/openbabel/openbabel/issues/2311).

[Updated on: Tue, 10 January 2023 08:27]

Report message to a moderator

Re: Copy and Paste 3D Pose [message #1807 is a reply to message #1806] Mon, 16 January 2023 00:14 Go to previous messageGo to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
Yeah, I think having this (the ability to copy and paste a 3D molecule's original coordinates (as SDF/MOL format from DW)Wink into another program would be a very powerful feature.
Re: Copy and Paste 3D Pose [message #1811 is a reply to message #1807] Wed, 18 January 2023 16:12 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Thanks for the suggestion. In case a structure column has one or multiple 3D coordinate sets attached, then the popup menu's 'Copy Structure As' submenu from any 2D-structure image in the table or structure view contains a 'Molfile V2' and 'Molfile V3' option for every 3D coordinate set associated with this structure.

By the way: The original 'Copy Structure As -> 3D-Structure' indeed provides a 3D structure in various formats for the clipboard, but depending on the application that receives the paste and decides, which format is actually used, the Z-coordinate may get lost.

Anyway, copying the molfile should work for all applications that can handle a paste molfile. The change is already deployed in the dev version.
Re: Copy and Paste 3D Pose [message #1817 is a reply to message #1811] Mon, 23 January 2023 23:41 Go to previous messageGo to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
Hi Thomas,

When I use the copy 'Molfile V2' or 'Molfile V3' option in this way, it copies 2D coordinates produced by DW, not the original 3D coords loaded from the SDF. Is it possible to get to the original 3D coords via a simply copy command in DW?

thanks,

Scott
Re: Copy and Paste 3D Pose [message #1818 is a reply to message #1817] Wed, 25 January 2023 12:50 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Hi Scott,

No, because when DataWarrior reads an SD-file, it creates a memory efficient molecule from that. The original SD-File content is not kept with a DataWarrior document. When reading from a 3D SD-file record, the relative orientation of the atoms is retained with a reasonable accuracy. The absolute position of the molecule is retained as well, but not exactly. Thus, when a new 3D-SD-file is created from the molecule, it will be moved slightly in space, which is typically much less than an Angstrom.

Thomas
Re: Copy and Paste 3D Pose [message #1819 is a reply to message #1818] Wed, 25 January 2023 15:59 Go to previous messageGo to next message
nbehrnd is currently offline  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
Re: Copy and Paste 3D Pose [message #1834 is a reply to message #1819] Thu, 02 February 2023 23:26 Go to previous message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
Thanks for this.
Previous Topic: Copy Images and Statistical value
Next Topic: DW as a KNIME Plugin
Goto Forum:
  


Current Time: Thu Nov 21 23:49:50 CET 2024

Total time taken to generate the page: 0.03630 seconds