chappertron / lammps-analyser

A linter for the LAMMPS scripting language
GNU General Public License v2.0
0 stars 0 forks source link

Expand String Variables into multiple arguments in commands #23

Open chappertron opened 3 days ago

chappertron commented 3 days ago

Based on the lammps/examples/snap/in.grid.tri example, it seems that string variables are expanded into multiple arguments.

variable    snap_options string &
        "${rcutfac} ${rfac0} ${twojmax} ${radelem} &
        ${wj} rmin0 ${rmin0} quadraticflag ${quadratic} &
        bzeroflag ${bzero} switchflag ${switch}"

# build zero potential to satisfy compute sna/atom

pair_style      zero ${rcutfac}
pair_coeff      * *

# define atom and grid computes

compute         b all sna/atom ${snap_options}

Currently, the call to the compute command is treated as having just a single argument, however, sna/atom requires many arguments.