macro buildEvolutionaryLibrary from a mac terminal [message #1621] |
Sat, 04 June 2022 12:17 ![Go to next message Go to next message](/forum/theme/myThemeWithHFCSS/images/down.png) |
Bruno
Messages: 4 Registered: June 2022
|
Junior Member |
|
|
Dear Thomas
I am trying to run a macro directly from the terminal on a MAc (i haven t tried yet on Linux)... The content of this test macro is below.
When i open it in DataWarrior it runs fine. When i run from the Terminal, it doesn t. Would you have some advice ?
many thanks
Bruno
<macro name=“TestMacro">
<task name="buildEvolutionaryLibrary">
paramConfig2=rotatableBonds 15 0
paramConfig1=cLogP 8 0
paramConfig0=molweight 350 750 0
kind=drugs
generationCount=automatic
survivalCount=32
startSet=ek`\JD@AGFnMOIc`Ha@HRYWmYUyWYgHhl\JjvNijZji`@jZfJAQ @@
generationSize=256
paramCount=3
</task>
<task name="selectWindow">
viewName=Evolutionary Library
</task>
<task name="selectView">
viewName=Table
</task>
<task name="deleteColumns">
defCriterion=
columnList=Child No cLogP cLogP Fitness Fitness Generation Molecular weight Molecular weight Fitness Parent Generation Parent ID Rotatable bond count Rotatable bond count Fitness
columnDefMode=list
</task>
<task name="findAndReplace">
isStructure=false
column=ID
isRegex=true
what=$
with=-coag
</task>
<task name="addSmilesCodes">
structureColumn=Structure
</task>
<task name="calculateCompoundProperties">
propertyList=nasty
structureColumn=Structure
</task>
<task name="deleteColumns">
defCriterion=
columnList=Structure
columnDefMode=list
</task>
<task name="saveTextFile">
fileName=/Users/Test/Desktop/Test-collection.dir/Evolutionar y_Library-coagulation.txt
</task>
<task name="closeWindow">
</task>
</macro>
|
|
|
|
|
Re: macro buildEvolutionaryLibrary from a mac terminal [message #1628 is a reply to message #1627] |
Mon, 06 June 2022 17:37 ![Go to previous message Go to previous message](/forum/theme/myThemeWithHFCSS/images/up.png) ![Go to next message Go to next message](/forum/theme/myThemeWithHFCSS/images/down.png) |
thomas
Messages: 694 Registered: June 2014
|
Senior Member |
|
|
Hi Bruno, thank you for the update. I have experimented a little bit and found that the appbundler, which I use to build the Macintosh DataWarrior application (/Applications/DataWarrior.app/Contents/MacOS/DataWarrior) has a bug, which prevents command line arguments from being passed to the main() function of the DataWarrior Java bytecode. It seems that there is a fork, that solves this issue. I will verify that and possibly use that fork for the next full Macintosh version. For the time being you may use another mechanism to launch DataWarrior from the command line if you have a JRE8 installed. If you don't have one, then I recommend liberica (full version is important, because only that has JavaFX included). If you type 'java -version' in a terminal and if it gives you a version 1.8... then you can use the following to solve your issue, i.e. to run datawarrior with parameters from the command line:
Copy the attached batch file 'datawarrior' to launch the DataWarrior application.
You may need to type and run 'chmod 755 datawarrior' to make the file executable.
Then you may execute the macro with 'datawarrior mymacro.dwam'.
I also attach a working macro file t.dwam in the following. Please notice that the macro exits without a dialog 'Do you want to save...'. I just noticed that it is the forum software that does the funny things to the macro, if you disable SMILIES.
-
Attachment: t.dwam
(Size: 1.21KB, Downloaded 219 times)
-
Attachment: datawarrior
(Size: 0.46KB, Downloaded 215 times)
[Updated on: Mon, 06 June 2022 17:46] Report message to a moderator
|
|
|
|
|