Hi All,
I’m trying to define a few variables with integer variables in my LAMMPS input, and to call to them later in the file. However, LAMMPS fails to read interpret these variables as integers and returns a corresponding error (“ERROR: Expected integer parameter in input script or data file”).
Is there a way to force a variable to be defined as an integer?
Below is the relevant part of my code:
Here is where I define the integer variables for relevant bond ID, angle, ID, atom type, etc…
variable CO_bond equal 5
variable CCO_angle equal 7
variable CCCO_dihedral equal 8
variable OH_bond equal 2
variable COH_angle equal 5
variable CCOH_dihedral equal 6
variable water_bond equal 1
variable water_angle equal 1
variable C_type equal 1
variable H_type equal 2
variable O_type equal 3
variable zC_type equal 4
variable zH_type equal 5
variable zO_type equal 6
(some unrelated stuff goes here)
This is an example of where I call the previously defined variables:
pair_style lj/cut/coul/long/tip4p v_O_type v_H_type v_water_bond v_water_angle 0.1250 12.000
pair_coeff v_C_type v_C_type 0.0859 3.3997 # C-C
Many thanks!
David