I am running polymer simulations inside a spherical region. I have loaded the polymer using read_data command. I want to add fixed number of individual new atom types inside this sphere while it avoids the polymer.

log            ./atom_create.out
lattice        fcc 0.85
units          lj
atom_style     full
boundary       f f f

read_data     ./case_1/1/polymer_centered.input

region         outerbox sphere 0.0 0.0 0.0 8.0 side in units box

create_atoms   3 region outerbox

This fills the fcc points inside the sphere and gives no control on how many atoms to add. I have tried doing

create_atoms 3 random 100 0413 outerbox overlap 1.0 maxtry 50

but I get an error - illegal create_atoms command. Is there a way to avoid the polymer while adding new atoms?

  • 2
    $\begingroup$ Please state the LAMMPS version (listed in the first line of the log file), and try removing the leading 0 from 0413 as that may be preventing LAMMPS from recognising it as a valid whole number for the RNG seed. $\endgroup$ Commented Oct 3, 2023 at 9:48
  • $\begingroup$ @ShernRenTee I am using 29 Sep 2021 - Update 2 version which i installed from the linux mint repositories. $\endgroup$
    – Roni Saiba
    Commented Oct 4, 2023 at 4:58
  • 1
    $\begingroup$ The documentation says random was only added to create_atoms in the 2Jun2022 version. So you need to use the latest version. LAMMPS is relatively easy to compile from source. $\endgroup$ Commented Oct 4, 2023 at 11:41
  • $\begingroup$ @ShernRenTee Thank you. Upon removal of overlap and maxtry the addition of random atom works for 2021 version. I have built the 2023 version and it runs as intended. $\endgroup$
    – Roni Saiba
    Commented Oct 6, 2023 at 5:34


You must log in to answer this question.

Browse other questions tagged .