Skip to content

How to write some codes in LiggghtsCommand #6

@mikejwg

Description

@mikejwg

Dear all,

We defined a group in liggghts (or in LiggghtsCommand) , and then print the total number of atoms in the group to a file.

executeProps0
{
command
(
group dele variable melt // melt was defined in liggghts
variable num equal count(dele)
print $num append noBlanks nummelt dot txt
);
runFirst off;
runLast off;
runEveryCouplingStep 1;
runEveryWriteStep off;
verbose;
}

But error occours. FOAM fatal IO error:
Illegal dictionary entry or environment variable name "num"
valid dictionary entries are 0( ).

if we changed to : print v_num append noBlanks nummelt dot txt
or print num append noBlanks nummelt dot txt
The nummelt.txt is generated, but every line is string "num" or "v_num"

Any comments are very appreciated.
regards,
John Jiang

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions