Suppressing force calculation for frozen particles.

Hi!

I run simulations on 15feb2015.

I want not to calculate forces for the atoms I want to keep “frozen”, mainly for the purpose of saving computational time. I thought this combination could do this:

fix 1 non_froozen nvt temp 1000.0 300.0 1.e2
fix 2 froozen setforce 0. 0. 0.

Hi!

I run simulations on 15feb2015.

I want not to calculate forces for the atoms I want to keep “frozen”, mainly for the purpose of saving computational time. I thought this combination could do this:

fix 1 non_froozen nvt temp 1000.0 300.0 1.e2
fix 2 froozen setforce 0. 0. 0.

,

but it don’t feel to accelerate although in my system frozen atoms are about 2/3 of all of them.

You are just zeroing the forces after the fact. You need to exclude the affected pairs from the neighbor list. See the neigh_modify command.

Axel

Thanks.

But the docs say it wouldn’t work with long range which limits the actual applicability.

Regards,

Igor

Thanks.

But the docs say it wouldn't work with long range which limits the actual
applicability.

well, you cannot have your cake and eat it. if you want to compute
long-range interactions accurately, you have to include those
interactions, because their reciprocal space counterparts will be
computed, too. you *may* exclude those, but you'll have to see, how
large the error is that you are introducing. so the only way to save
some time at full accuracy, would be to come up with a variant of the
corresponding pair style, that can cache the interactions and where
you then store the per atom contributions from the immobile pairs and
read them back. not impossible, but not trivial either.

axel.

Is there a way to set a static external force field in LAMMPS with energy (or force) being assigned to a coordinate mesh and read at the start from a file, for example?

My examination of the LAMMPS fixes suggest that the answer is currently 'No'... But if it was possible it would be basically a more straightforward and not so tricky solution for the problem, as long as the mesh is dense enough.

Thanks and regards,
Igor Traskunov

The fix addforce command can define an added force via

an atom-style variable. Such variables can also be

atomfile style variables, which means their values

are read from a file (once or multiple times, i.e. time-varying).

See the variable command for details.

Steve

I should add that what I just posted will read

one value per atom from the file. If you want

to read a mesh of values and interpolate that

to the atoms each timestep, you would have to

write a fix that does that, i.e. read the mesh, store

it, and perform the interpolation.

Steve