openmolecules.org

 
Home » DataWarrior » Bug Reports » Change default structure copy option (Change default structure copy option)
Change default structure copy option [message #2052] Tue, 19 December 2023 16:36 Go to next message
helloWorld22 is currently offline  helloWorld22
Messages: 13
Registered: June 2022
Junior Member
Hi,
I have created a plugin that retrieves data including structures from our internal database.
The structures are rendered in DW successfully.
However, when I try to copy all the data from the datatable including structures, the structures are copied as ID, that chemaxon for excel cannot parse.

When i copy 1 structure at a time, I get option to select MolfileV2 or smile or ID.
But when coping the full table that has data as well as structure, by default ID is selected.

Is it possible to change it MolfileV2 or V3 or smiles or Give an option while coping from the datatable?

Thanks
Re: Change default structure copy option [message #2054 is a reply to message #2052] Tue, 19 December 2023 23:20 Go to previous messageGo to next message
nbehrnd is currently offline  nbehrnd
Messages: 224
Registered: June 2019
Senior Member
Hello,

if a SMILES string is sufficient to serve as an «anchor» for your work after DW, Chemistry -> From Chemical Structure -> Add SMILE Code allows you to assign all entries in the array this descriptor. (It is an action you equally can store in a DW marco file, file extension .dwam). Export then the array via File -> Save Special -> Text File as a plain ASCII text file with one header line and columns separated by tabulators. This will transfer the whole array into the new format.

Though one can alter the sequence of columns in a dwar array by drag-and-drop, the export as text file always starts by the column about the structure / ID as the first one. At level of the text file, this can be changed by a script (e.g., AWK), or a spread sheet (gnumeric, LibreOffice Calc, etc.). The later however can impose some limitations (e.g., 65000 rows maximum in MS Excel) not every time visible.

Regards,

Norwid
Re: Change default structure copy option [message #2063 is a reply to message #2054] Sun, 31 December 2023 14:47 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Hello

if your plugin creates two columns, which both receive the same SMILES, but are defined with different types (COLUMN_TYPE_STRUCTURE_FROM_SMILES and COLUMN_TYPE_ALPHANUMERICAL), then your DataWarrior table will contain one column with visible chemical structures and another with your original SMILES codes. When copying parts of the table you might include the SMILES column, but not the one with chemical structures, ChemAxon should happily parse...

The advantage will be that you don't convert from Smiles to IDCode and back to SMILES, which always poses the danger to change the structure, because of different aromaticity and stereo chemistry concepts...
Re: Change default structure copy option [message #2096 is a reply to message #2063] Thu, 11 January 2024 10:06 Go to previous message
helloWorld22 is currently offline  helloWorld22
Messages: 13
Registered: June 2022
Junior Member
Thanks all for your reply.
Smiles work fine now.

[Updated on: Thu, 11 January 2024 10:07]

Report message to a moderator

Previous Topic: Font Scale Not Adjusting
Next Topic: Bizarre behavior with macos Sonoma
Goto Forum:
  


Current Time: Sun Nov 24 03:28:22 CET 2024

Total time taken to generate the page: 0.03728 seconds