openmolecules.org

 
Home » DataWarrior » Functionality » Datawarrior Commandline Option to Use Template
Datawarrior Commandline Option to Use Template [message #2362] Sun, 22 December 2024 20:35 Go to next message
sbembenek18 is currently offline  sbembenek18
Messages: 62
Registered: April 2019
Member
From the command line, is there a flag that allows one to read a given sdf file with a saved datawarrior template?
Re: Datawarrior Commandline Option to Use Template [message #2363 is a reply to message #2362] Sun, 22 December 2024 21:58 Go to previous messageGo to next message
nbehrnd is currently offline  nbehrnd
Messages: 229
Registered: June 2019
Senior Member
Conceptually, this line of thought is close to let Jmol process data silently (no GUI) by a call of `java -jar ./Jmol.jar -ions my_script.spt` with actions defined in `my_script.spt` -- hence I welcome the feature suggestion.

In case of a native installation in Linux and bypassing the `datawarrior` BASH script the installation provides, I didn't advance further than learning 1) one has to use the Java runtime engine provided by the DataWarrior installation because an other usually used system wide does not. And 2) to reach out for the launcher, i.e.

/opt/datawarrior/jre/bin$ ./java -jar ../../datawarriorlauncher.jar

From here, no successful further advance to either .dwar or .dwam files of tutorial or reference folder (though `datawarrior ./reference/PhysProp.dwar` opens GUI and then file `PhysProp.dwar`).

Norwid
Re: Datawarrior Commandline Option to Use Template [message #2365 is a reply to message #2363] Mon, 23 December 2024 20:41 Go to previous messageGo to next message
sbembenek18 is currently offline  sbembenek18
Messages: 62
Registered: April 2019
Member
Yeah I think this would be a great feature to have as a flag option -->

.../../datawarrior myfile.sdf --template mytemplate.dwat

Our current use case is that we have several SDF models and simply want to script it such that DW opens them all at the end of our run.

This also reminds me of another feature I have been wanting: tabs in DW for multiple data sets.

Then together you could imagine having an existing DW project that you can add aditional SDF file to via the tab approach. And this could be done manually once the project is open or via commandline -->

.../../datawarrior myfile.sdf --template myproject.dwar

where he new SDF would then be added to the project and inherent all the existing features of the original.

I this would really enhance what is already great about DW.


[Updated on: Mon, 23 December 2024 20:50]

Report message to a moderator

Re: Datawarrior Commandline Option to Use Template [message #2366 is a reply to message #2365] Mon, 23 December 2024 23:08 Go to previous message
nbehrnd is currently offline  nbehrnd
Messages: 229
Registered: June 2019
Senior Member
From your comment, I sense you are comfortable with the command line. Hence I feel comfortable to suggest DataWarrior's mode of action need not to be "file based" only, perhaps additionally could be "stream based" (as so many unix/linux utilities).

An illustration: OpenBabel reads many more file formats than e.g., .sdf DataWarrior accepts as input. While converting these files into a suitable syntax, OpenBabel can apply numeric, or (sub) structure related criteria as a filter. Hence, why not allow openbabel's results (via stdout) as one form of input (stdin) for DataWarrior (in unix' parlance, via a pipe)? Second, if DataWarrior's results are not an illustration, a 2D/3D diagram, they mostly are human readable plain text written into the .dwar file. While often useful, I think a permanent output file needn't be DataWarrior's only mode of operation -- there equally could be an optional output by DataWarrior itself as an output stream to redirect (`>`) or append (`>>`) to a permanent record, or to relay to a subsequent tool living in the command line.

Norwid

https://open-babel.readthedocs.io/en/latest/Descriptors/desc riptors.html
https://en.wikipedia.org/wiki/Pipeline_(Unix)
Previous Topic: number of visible rows into macro saving variable
Next Topic: Veiwing PDB Binding Sites in DataWarrior
Goto Forum:
  


Current Time: Tue Jan 21 11:05:35 CET 2025

Total time taken to generate the page: 0.02654 seconds