[lammps-users] fix wall/reflect command



Dear Sir/Madam,







I am a new LAMMPS user and I am having troubles with the implementation of a reflective wall in my code. The input script is shown below for your convenience. I have read the manual and the documentation regarding the fix wall/reflect command but I still don’t understand why every time I try to run an error pops up and does not allow me to run my simulation. I tried to search on the documentation and on the web examples that uses this command but I have not had any success. Would it be possible for you to tell what is wrong in my input script? Also, would you be able to provide me with some basic examples that shows how to implement this command on an input script?







Your help on this regard would be much appreciated.







Thanks in advance for your help and support.







Regards,



Luis











# Create T = Temperature and r=density variables (reduced in LJ units)



variable T equal 0.80



variable r equal 0.80







# Create variable for sampling frequency (in timesteps): DCD trajectory, MSD, RDF, Thermodynamic Properties



variable f equal 10







# Create variable for the number of timesteps to equilibrate



variable e equal 1000







# Create variable for the number of timesteps for production



variable n equal 2000







# Units for simulation



units lj







# Simulation style



atom_style atomic







# Create lattice for atom placement (lattice type and “scale”)



# For LJ units scale is reduced density



# For non-LJ units scale is the lattice constant



lattice fcc $r







# Define variable for box length (reduced by lattice constant - determined automatically from density for LJ units)



variable L equal 7.0







# Create a region for the box [-L,L] in x,y,z-directions



region mybox block -$L $L -$L $L -$L $L











# Create the box (id, region)



create_box 1 mybox







# Specifiy the mass of atoms (atom id, mass (reduced))



mass 1 1.0







# Create the atoms (id, region)



create_atoms 1 region mybox







# Define the potential style (smooths LJ potential to zero between 4.5 and 5.0 sigma)



pair_style lj/smooth 4.5 5.0







# Define pair coefficients (for pair 1-1: eps = 1.0 and sig = 1.0)



pair_coeff 1 1 1.0 1.0







# Set neighbor list skin distance (keep list 1 sigma beyond force cutoff)



neighbor 1.0 bin







# Assign initial velocities (T* = $T, random seed = 1234)



velocity all create $T 1234







# Fix the integrator for the atoms (id, atoms, T* initial, T* finial, Drag Coeff)



# Note: Uses Nose-Hoover thermostat



fix 1 all nvt $T $T 0.005







# This is the line where the error pops up



fix 2 all wall/reflect -$L $L -$L $L -$L $L







# Write thermo properties to log (frequency (timesteps))



thermo $f







# Run simulation to equilibrate the system (no. timesteps, default timestep for LJ units is 0.005tau)



run $e







# Run simulation for the production phase (no. timesteps, default timestep for LJ units is 0.005tau)



#run $n





|

Dear Sir/Madam,

dear luis,

I am a new LAMMPS user and I am having troubles with the
implementation of a reflective wall in my code. The input script is
shown below for your convenience. I have read the manual and the
documentation regarding the fix wall/reflect command but I still don’t
understand why every time I try to run an error pops up and does not
allow me to run my simulation. I tried to search on the documentation

that is most likely because your input does not correspond
to the syntax of the command as it is currently implemented
and documented in the online documentation.

please make sure that you always use the syntax that matches
the version of lammps that you are using. if you want help
from the mailing list, that typically means that you should
make sure that you have the latest patchlevel compiled.

and on the web examples that uses this command but I have not had any
success. Would it be possible for you to tell what is wrong in my
input script? Also, would you be able to provide me with some basic
examples that shows how to implement this command on an input script?

there _are_ examples in the online documentation:
http://lammps.sandia.gov/doc/fix_wall_reflect.html

you input has altogether three problems:

1) you need to set a non-periodic boundary for
  reflective walls. so in your case you need to
  set: boundary f f f

2) you need to use the correct syntax for the fix:

  fix 2 all wall/reflect xlo -$L xhi $L ylo -$L yhi $L zlo -$L zhi $L

  or:

  fix 2 all wall/reflect xlo EDGE xhi EDGE ylo EDGE yhi EDGE zlo EDGE
zhi EDGE

3) your fix nvt syntax is wrong, too. correct is:
  fix 1 all nvt temp $T $T 0.005

  (btw: the time constant of the thermostat is awfully short).

cheers,
    axel.