set of commands using liggghtsCommandModel with multiple executes

Submitted by mschramm on Sun, 08/23/2020 - 07:20

Hello,
I am looking to do multiple commands during each of the coupling steps.
I was hopeful that i would be able to create an execute command that would
read another liggghts script and then continue the simulation, but was unable to do so.
I tried both include and jump.

I was then hopeful to us an if statement to force the behavior but the command would always "stop" short of reading it in.
If I had the following
if "(1==0)" then "quit" else "print 'hello'"
becomes
if (1==0) then quit else print hello
which becomes the command
print

which throws an error.

Does anyone know a way around this?

mschramm | Mon, 08/24/2020 - 05:39

Hello,
Letting people know that I have edited the code base to allow for such commands. I have added the following keywords:
sQuote -> '
dQuote -> "
varBegin -> ${ [This also sets the addBlank variable to false so you don't get variables like this -> ${ testVar }]
varEnd -> } [This sets the addBlank variable to true]

I will be working on a python script that can turn liggghts commands that you would use regularly into the correct structure for use in the liggghtsCommand dictionary.
Just need to find out what is the allocated size of the "command" variable first...