interatomic distance

Dear All,

What is the easiest way to calculate the interatomic distance between two atoms that not necessarily make part of the same molecule?

I’m using the ReaxFF force field, so there are no predefined bonds.

Many thanks in advance for your input.

Best regards

Theo de Bruin
Ingénieur de recherche
IFP Energies nouvelles - Direction Chimie et physico-chimie appliquées
1 et 4 avenue de Bois-Préau
92852 Rueil-Malmaison Cedex - France
Tél. : 01 47 52 54 38 - Fax : 01 47 52 70 58
Email : [email protected]…3903…
Web : www.ifpenergiesnouvelles.fr

2013/2/22 DE BRUIN Theodorus <[email protected]>:

Dear All,

What is the easiest way to calculate the interatomic distance between two
atoms that not necessarily make part of the same molecule?

I'm using the ReaxFF force field, so there are no predefined bonds.

that shouldn't keep you from defining bonds with a zero force constant
anyway and using bond/local to dump their distance.
remember to set special_bonds lj/coul 1.0 1.0 1.0 to not get any
unwanted exclusions.

axel.

Dear Alex,

Thanks for your prompt reply and your suggestions.

I got now:

group S_atoms id 2 3

fix freeze_atoms S_atoms setforce 0.0 0.0 0.0

compute S_distance2 S_atoms bond/local dist

dump 3 S_atoms local 10 s-distances.dump index c_S_distance1

however, this leads to the following error message:

ERROR: Compute bond/local used when bonds are not allowed

which is likely due to fact that I’m using “atom_style charge” where no bonds are defined since I’m using ReaxFF…

I would appreciate any further help.

Kind regards

Theo

-----Message d’origine-----

Dear Alex,

Thanks for your prompt reply and your suggestions.

I got now:

group S_atoms id 2 3

fix freeze_atoms S_atoms setforce 0.0 0.0 0.0

compute S_distance2 S_atoms bond/local dist

dump 3 S_atoms local 10 s-distances.dump index c_S_distance1

however, this leads to the following error message:

ERROR: Compute bond/local used when bonds are not allowed

which is likely due to fact that I'm using "atom_style charge" where no
bonds are defined since I'm using ReaxFF…

yes. you didn't define a bond, so you cannot measure it.

axel.

If you literally mean 2 atoms (not a bunch of pairs of atoms),
then you can define an equal-style variable that computes sqrt(dx*dx_dy+dy...)
using the IDs of the atoms. Then you can print it
with thermo output or dump it to a file via fix ave/time, etc.

Steve

2013/2/22 DE BRUIN Theodorus <[email protected]>:

Dear Steve,

Your suggestion works out well! Though I needed (of course) to define:

atom_modify map array

However, I’m not sure if this puts all atoms in an array, or is it possible to put “just” the two atoms in which I’m interested in the array?

Best regards

Theo

-----Message d’origine-----

It puts all the atoms in an array.

Steve