openmolecules.org

 
Home » DataWarrior » Functionality » Creat macro file and run, but cant open the created dwar file (mainViewCount, mainViewDockInfo, macro file)
Creat macro file and run, but cant open the created dwar file [message #630] Wed, 18 September 2019 11:16 Go to next message
dongkeke is currently offline  dongkeke
Messages: 7
Registered: June 2019
Location: 中国
Junior Member

Dear Thomas,

I create a macro file that import txt-file with chmical smiles to datawarrior, and creates the imageand then closes the datawarrior application. Then I open the macro file in windows, and I get a dwar file. But when I open the created dwar file, it occured a message like the attached picture.
index.php?t=getfile&id=102&private=0
I checked the dwar file, and found there are some settings. When I modify the three number as 0.5, the dwar file could be opened normally. But the seeting would not be recorded in the macro file. How can I open the dwar file in a correct way.

"<mainViewCount="5">
<mainViewDockInfo0="root">
<mainViewDockInfo1="Table bottom -0.006">
<mainViewDockInfo2="2D View center">
<mainViewDockInfo3="Table right -0.005">
<mainViewDockInfo4="3D View_raw right -0.005">"

Another question is that I can not import the file with chemical smiles in Linux. It is stucked in the process of converting smiles.

Thanks,
kelly
  • Attachment: message.PNG
    (Size: 12.85KB, Downloaded 44 times)


Dong_Keke
Re: Creat macro file and run, but cant open the created dwar file [message #631 is a reply to message #630] Wed, 18 September 2019 23:26 Go to previous messageGo to next message
nbehrnd is currently offline  nbehrnd
Messages: 20
Registered: June 2019
Junior Member
Dear Kelly,

in my experience, there is more than one form of «SMILES». Just today I faced this
again with SMILES exported from the CCDC database' Python API where a few of them
were not compatible with DW. Most of them were curated successfully with openbabel,
translating these into its default SMILES format accessible for DW. This may be done
in babel's GUI, but if you have many SMILES codes to convert and already in a file, it
is often more convenient to perform this on the terminal. If this does not help, it
still is possible to try openbabel's translation into «canonical SMILES». While the
two SMILES differ, depending on using either default or canonical SMILES, DW typically
understands at least one of them smoothly. So I would suggest to check if the import
of your structures into DW with «reformatted SMILES» still stalls.

As example I attach the list of SMILES originally generated from the CCDC API and its
subsequent import in DW, which did not work completely. But both openbabel's SMILES
worked fine (two SMILES lists and one almost complete DW import.) The machine where
the CCDC database was installed was running Windows, the one eventually passing the data
to DW was Linux. While this was a smooth transition, maybe yours got malformatted for
the different line endings in the operational systems. In many Linuxes, there is the
dos2unix utility allowing to curate this while passing from Windows to Linux / Mac to
Linux and back.

Norwid

http://openbabel.org/wiki/Main_Page
http://dos2unix.sourceforge.net/
Re: Creat macro file and run, but cant open the created dwar file [message #633 is a reply to message #631] Thu, 19 September 2019 16:13 Go to previous messageGo to next message
dongkeke is currently offline  dongkeke
Messages: 7
Registered: June 2019
Location: 中国
Junior Member

Thanks, Norwid. I will have a try.

Dong_Keke
Re: Creat macro file and run, but cant open the created dwar file [message #634 is a reply to message #631] Thu, 19 September 2019 16:21 Go to previous messageGo to next message
dongkeke is currently offline  dongkeke
Messages: 7
Registered: June 2019
Location: 中国
Junior Member

Thanks, Norwid,

But the another key question is that How I can set the "mainViewDockInfo" information in the macro file? Or it just only support the defalut setting?

Thanks,

Kelly


Dong_Keke
Re: Creat macro file and run, but cant open the created dwar file [message #635 is a reply to message #634] Thu, 19 September 2019 19:47 Go to previous messageGo to next message
nbehrnd is currently offline  nbehrnd
Messages: 20
Registered: June 2019
Junior Member
Dear Kelly,

so far, I used DW's option to record macros just a few times. Reading the
.dwam files with a text editor did not show me an occurrence of the keyword
«mainViewDockInfo» you mention. I just put a very elementary marco together
which, if run after importing the file with babel-generated canonical SMILES
by yesterday will a) determine the molecular mass of the molecules encoded
in these strings and b) subsequently interchange the table and the array with
each other.

I speculate the addition of a typical test file and the DW macro file written
by you as minimal working example might help in finding a solution for your problem.

Norwid
Re: Creat macro file and run, but cant open the created dwar file [message #658 is a reply to message #635] Wed, 09 October 2019 23:42 Go to previous message
thomas is currently offline  thomas
Messages: 234
Registered: June 2014
Senior Member
Dear Kelly,

sorry for the late reply. Would it be possible to send me a small example macro, such that I can reproduce the issue. And also may an example of the SMILES file that is causing the trouble? DataWarrior should never crash, when reading SMILES, even if the SMILES are invalid. Invalid SMILES should simply be ignored.

Thanks in advance, Thomas
Previous Topic: Pasting rows between worksheets
Next Topic: superpose conformers of different molecules in conformer explorer
Goto Forum:
  


Current Time: Tue Oct 15 05:56:28 CEST 2019

Total time taken to generate the page: 0.00780 seconds