[lammps-users] Can you define a region or group inside a data file?

Hi all,

I wish to define a mobile region/group for “fix nvt”, but i use data file as input, so i cannot define the region/group in my input script. I want to ask is it possible to define it in the input data file?

Thanks!
Yixin

Hi all,
I wish to define a mobile region/group for "fix nvt", but i use data file as
input, so i cannot define the region/group in my input script. I want to ask

is it possible to define it in the input data file?

no.

but you can very well define regions and groups in your input script
when using a data file. i do this all the time.

what makes you think it should it not be possible?

cheers,
     axel.

May i ask for a simple example of how you define regions and groups in the input script?

I use read_restart to read my data file, and when i try defining regions/groups in my input script, i get a error: Use of region with undefined lattice.

Thanks for the help!

Here is my script, i wish to define a mobile region so i only do “fix nvt” to the mobile region instead of the whole box

3d Al-Ni Multilayer simulation

read_restart fcc001sample

EAM potentials

pair_style eam/alloy
pair_coeff * * AlNi2010_lammps.eam Al Ni

define groups

region move block 0 52.91520 0 52.91520 2 80
group mobile region move

reset_timestep 0

May i ask for a simple example of how you define regions and groups in the
input script?
I use read_restart to read my data file, and when i try defining
regions/groups in my input script, i get a error: Use of region with
undefined lattice.

please re-read the documentation, particularly the section quoted below
and remember that the default is lattice units:

The units keyword determines the meaning of the distance units used to
define the region for any argument above listed as having distance
units. It also affects the scaling of the velocity vector specfied
with the vel keyword, the amplitude vector specified with the wiggle
keyword, and the rotation point specified with the rotate keyword,
since they each involve a distance metric.

A box value selects standard distance units as defined by the units
command, e.g. Angstroms for units = real or metal. A lattice value
means the distance units are in lattice spacings.

axel.

The region command has a "units:" option: box or lattice.
The default is lattice, so if you don't want this then use box.
The doc page explains the details.

Steve