Issue with replica generation with syle 'final' in NEB

Hello everyone I am running NEB calculation for diffusion of Si atom in 64 atoms supercell. I am facing error with number of replicas “ERROR: Cannot use NEB with a single replica”. I am using neb command with style “final” as ‘neb 0.0 0.1 1000 1000 100 final sic.final’.
It’s mentioned in documentation, “For each atom that appears in the file, the new coordinates are assigned to that atom in the final replica. Each intermediate replica also assigns a new position to that atom in an interpolated manner”
according to this, lammps should generate intermediate replica it self according to the coordinates of diffused atom in file.final . my question is,
why lammps is not generating more than 1 replica in the present case ?
how can we control number of replicas for this style, as it’s not given in the documentation ?
only ambiguity from my side could be while specifying the dimensions of ‘region’ command as I didn’t understand meanings of simulation ‘box’ units, so I followed the example NEB in lammps database.
the my in put is given below
-----input—
units metal
dimension 3
boundary p p p
atom_style atomic
variable u uloop 20

#initial data
read_data sic.si.vac.initial

#potential
pair_style tersoff
pair_coeff * * /usr/local/Cellar/lammps/20220623/share/lammps/potentials/SiC.tersoff Si C

#initial minimization to relax whole supercell
minimize 1.0e-6 1.0e-4 1000 10000
timestep 0.003

#define groups
region surround block 10 18 17 20 22 28 units box

#group of NEB atoms
group nebatoms region surround
group nebatoms id 40
group nonneb subtract all nebatoms

#apply nudging among replica, fix 1,fix 2,fix3 . specify as many as u want
fix 1 nebatoms neb 1.0 parallel ideal

thermo 100

#save dump
dump 1 nebatoms atom 10 dump.neb.$u
dump 2 nonneb atom 10 dump.nonneb.$u

#run NEB for 2000 steps or to force tolerance

min_style quickmin
neb 0.0 0.1 1000 1000 100 final sic.final
----sic.final-----
1
40 2 3.28467 5.47445 5.47445
------sic.si.vac.initial—
64 atoms
2 atom types
0.0 8.75912 xlo xhi
0.0 8.75912 ylo yhi
0.0 8.75912 zlo zhi

Masses

1 28.0855 # Si
2 12.0107 # C

Atoms # atomic

1 1 1.09489 1.09489 3.28467
2 1 1.09489 1.09489 7.66423
3 1 1.09489 5.47445 3.28467
4 1 1.09489 5.47445 7.66423
5 1 5.47445 1.09489 3.28467
6 1 5.47445 1.09489 7.66423
7 1 5.47445 5.47445 3.28467
8 1 5.47445 5.47445 7.66423
9 1 1.09489 3.28467 1.09489
10 1 1.09489 3.28467 5.47445
11 1 1.09489 7.66423 1.09489
12 1 1.09489 7.66423 5.47445
13 1 5.47445 3.28467 1.09489
14 1 5.47445 3.28467 5.47445
15 1 5.47445 7.66423 1.09489
16 1 5.47445 7.66423 5.47445
17 1 3.28467 1.09489 1.09489
18 1 3.28467 1.09489 5.47445
19 1 3.28467 5.47445 1.09489
20 1 3.28467 5.47445 5.47445
21 1 7.66423 1.09489 1.09489
22 1 7.66423 1.09489 5.47445
23 1 7.66423 5.47445 1.09489
24 1 7.66423 5.47445 5.47445
25 1 3.28467 3.28467 3.28467
26 1 3.28467 3.28467 7.66423
27 1 3.28467 7.66423 3.28467
28 1 3.28467 7.66423 7.66423
29 1 7.66423 3.28467 3.28467
30 1 7.66423 3.28467 7.66423
31 1 7.66423 7.66423 3.28467
32 1 7.66423 7.66423 7.66423
33 2 0.0 0.0 0.0
34 2 0.0 0.0 4.37956
35 2 0.0 4.37956 0.0
36 2 0.0 4.37956 4.37956
37 2 4.37956 0.0 0.0
38 2 4.37956 0.0 4.37956
39 2 4.37956 4.37956 0.0
40 2 4.37956 4.37956 4.37956
41 2 0.0 2.18978 2.18978
42 2 0.0 2.18978 6.56934
43 2 0.0 6.56934 2.18978
44 2 0.0 6.56934 6.56934
45 2 4.37956 2.18978 2.18978
46 2 4.37956 2.18978 6.56934
47 2 4.37956 6.56934 2.18978
48 2 4.37956 6.56934 6.56934
49 2 2.18978 0.0 2.18978
50 2 2.18978 0.0 6.56934
51 2 2.18978 4.37956 2.18978
52 2 2.18978 4.37956 6.56934
53 2 6.56934 0.0 2.18978
54 2 6.56934 0.0 6.56934
55 2 6.56934 4.37956 2.18978
56 2 6.56934 4.37956 6.56934
57 2 2.18978 2.18978 0.0
58 2 2.18978 2.18978 4.37956
59 2 2.18978 6.56934 0.0
60 2 2.18978 6.56934 4.37956
61 2 6.56934 2.18978 0.0
62 2 6.56934 2.18978 4.37956
63 2 6.56934 6.56934 0.0
64 2 6.56934 6.56934 4.37956

The information about how to determine the number of replicas is given in the documentation. A quote from the neb command documentation page:

Each replica runs on a partition of one or more processors. Processor partitions are defined at run-time using the -partition command-line switch. Note that if you have MPI installed, you can run a multi-replica simulation with more replicas (partitions) than you have physical processors, e.g you can run a 10-replica simulation on just one or two processors. You will simply not get the performance speed-up you would see with one or more physical processors per replica. See the Howto replica doc page for further discussion.

1 Like

Dear Dr. akohlmey I am sorry for my question the answer is already in documentation, Thank you so much for pointing in the direction. it’s really helpful, I am able to run it with multi replicas,
but now I am facing following error, considering the inputs in the trailing message, can you recommend me how to approach this problem ? I think there could be problem with input script as now error is from running script.
MacBook-Air neb_calc % mpirun -np 2 lmp_mpi -partition 2x1 -in in.neb.sivac

LAMMPS (23 Jun 2022)

Running on 2 partitions of processors


MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD

with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.

You may or may not see output from other processes, depending on

exactly when Open MPI kills them.
please accept my best regards

Please see the README file in the examples/neb folder.

A NEB calculation with just 2 replica is quite pointless: you have the start and the end point, but nothing that will tell you what happens in between.

1 Like

Dear Dr. akohlmey
Thanks for brilliant suggestion, unfortunately I am stuck with the following problem, can you kindly suggest me how to approach this problem ? The error message and input is given below

------Error-------
mpirun -np 16 lmp -partition 8x2 -in in.neb.sivac

No protocol specified

LAMMPS (20 Nov 2019)

Running on 8 partitions of processors


MPI_ABORT was invoked on rank 3 in communicator MPI_COMM_WORLD

with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.

You may or may not see output from other processes, depending on

exactly when Open MPI kills them.


[IMM-PowerEdge-R7525:2266899] PMIX ERROR: UNREACHABLE in file …/…/…/src/server/pmix_server.c at line 2193

[IMM-PowerEdge-R7525:2266899] PMIX ERROR: UNREACHABLE in file …/…/…/src/server/pmix_server.c at line 2193

[IMM-PowerEdge-R7525:2266899] PMIX ERROR: UNREACHABLE in file …/…/…/src/server/pmix_server.c at line 2193

[IMM-PowerEdge-R7525:2266899] PMIX ERROR: UNREACHABLE in file …/…/…/src/server/pmix_server.c at line 2193

[IMM-PowerEdge-R7525:2266899] PMIX ERROR: UNREACHABLE in file …/…/…/src/server/pmix_server.c at line 2193

[IMM-PowerEdge-R7525:2266899] PMIX ERROR: UNREACHABLE in file …/…/…/src/server/pmix_server.c at line 2193

[IMM-PowerEdge-R7525:2266899] 15 more processes have sent help message help-mpi-api.txt / mpi-abort

[IMM-PowerEdge-R7525:2266899] Set MCA parameter “orte_base_help_aggregate” to 0 to see all help / error messages

---------------------input------------------------
units metal
dimension 3
boundary p p p
atom_style atomic
variable u uloop 20
#initial data
read_data sic.si.vac.initial

#potential
pair_style tersoff
pair_coeff * * /usr/local/Cellar/lammps/20220623/share/lammps/potentials/SiC.tersoff Si C

#initial minimization to relax whole supercell
minimize 1.0e-6 1.0e-4 1000 10000
timestep 0.001

#define groups
region surround block 4 4 6 8 10 12 units box

#group of NEB atoms
group nebatoms region surround
group nebatoms id 40
set group nebatoms type 2
group nonneb subtract all nebatoms

#apply nudging among replica, fix 1,fix 2,fix3 . specify as many as u want
fix 1 nebatoms neb 1.0 parallel neigh

thermo 100

#save dump
dump 1 nebatoms atom 10 dump.neb.$u
dump 2 nonneb atom 10 dump.nonneb.$u

#run NEB for 2000 steps or to force tolerance

min_style quickmin
neb 0.0 0.1 10000 10000 100 final sic.final

The in.neb.sivac example works for me with LAMMPS version 3 November 2022.

Yours seems modified though and - for example - you don’t provide the data file, so I cannot test it.

Can you run a simple minimization without NEB?

Dear Dr. akohlmey
thanks for your kind reply, since you mention modification, yes I tried to model vacancy hopping in different way(giving initial structure with vacancy defect and final with coordinates of vacancy to the atom I want to diffuse) I couldn’t grab the reason why it didn’t worked. Also I am afraid matsci is not allowing me to upload my input and data file, can I send you the files by email so you can try ? because I am getting the same error by modifying the input script according to in.neb.sivac (given below input + read_data information) The only difference is I am not specifying 0 velocities [0 along all x y z as it’s done in example, as it same either writing 0.0 value or simply not writing] since I am making structure using Ovito
for your question, Yes I am able to run simple minimization.
----input—
#NEB simulation for vacancy hopping in SiC
units metal
atom_style atomic
boundry p p p

read_data sic_64_initial

#make a vacancy

group Si type 2
group del id 20
delete_atoms group del compress no
#making group of atoms around vacancy for use in damp command
group vacneigh id 60 12 40 48 18 52

#choose potential
pair_style tersoff
pair_coeff * * /usr/local/Cellar/lammps/20220623/share/lammps/potentials SiC.tersoff Si C

#setting up neb run
variable u uloop 20

#only output atoms arround vaccancy
dump events vacneigh custom 1000 dump.neb.sivac.$u id type x y x

#initial minimization for vaccany relaxation
displace_atoms all random 0.1 0.1 0.1 123456
minimize 1.0e-6 1.0e-4 1000 10000
reset_timestep 0
#give spring constant among replicas
fix 1 all neb 1.0 parallel ideal
thermo 100

#running neb till tolerance
timestep 0.01
min_syle quickmin
neb 0.0 0.01 1000 1000 10 final sic.final

----sic.final-------------------------------

1

40 2 3.28467 5.47445 5.47445

—sic.initial----------------------------------------

LAMMPS data file written by OVITO Basic 3.7.3

64 atoms

2 atom types

0.0 8.75912 xlo xhi

0.0 8.75912 ylo yhi

0.0 8.75912 zlo zhi

Masses

1 28.0855 # Si

2 12.0107 # C

Atoms # atomic

1 1 1.09489 1.09489 3.28467

2 1 1.09489 1.09489 7.66423

3 1 1.09489 5.47445 3.28467

4 1 1.09489 5.47445 7.66423

5 1 5.47445 1.09489 3.28467

6 1 5.47445 1.09489 7.66423

7 1 5.47445 5.47445 3.28467

8 1 5.47445 5.47445 7.66423

9 1 1.09489 3.28467 1.09489

10 1 1.09489 3.28467 5.47445

11 1 1.09489 7.66423 1.09489

12 1 1.09489 7.66423 5.47445

13 1 5.47445 3.28467 1.09489

14 1 5.47445 3.28467 5.47445

15 1 5.47445 7.66423 1.09489

16 1 5.47445 7.66423 5.47445

17 1 3.28467 1.09489 1.09489

18 1 3.28467 1.09489 5.47445

19 1 3.28467 5.47445 1.09489

20 1 3.28467 5.47445 5.47445

21 1 7.66423 1.09489 1.09489

22 1 7.66423 1.09489 5.47445

23 1 7.66423 5.47445 1.09489

24 1 7.66423 5.47445 5.47445

25 1 3.28467 3.28467 3.28467

26 1 3.28467 3.28467 7.66423

27 1 3.28467 7.66423 3.28467

28 1 3.28467 7.66423 7.66423

29 1 7.66423 3.28467 3.28467

30 1 7.66423 3.28467 7.66423

31 1 7.66423 7.66423 3.28467

32 1 7.66423 7.66423 7.66423
33 2 0.0 0.0 0.0

34 2 0.0 0.0 4.37956

35 2 0.0 4.37956 0.0

36 2 0.0 4.37956 4.37956

37 2 4.37956 0.0 0.0

38 2 4.37956 0.0 4.37956

39 2 4.37956 4.37956 0.0

40 2 4.37956 4.37956 4.37956

41 2 0.0 2.18978 2.18978

42 2 0.0 2.18978 6.56934

43 2 0.0 6.56934 2.18978

44 2 0.0 6.56934 6.56934

45 2 4.37956 2.18978 2.18978

46 2 4.37956 2.18978 6.56934

47 2 4.37956 6.56934 2.18978

48 2 4.37956 6.56934 6.56934

49 2 2.18978 0.0 2.18978

50 2 2.18978 0.0 6.56934

51 2 2.18978 4.37956 2.18978

52 2 2.18978 4.37956 6.56934

53 2 6.56934 0.0 2.18978

54 2 6.56934 0.0 6.56934

55 2 6.56934 4.37956 2.18978

56 2 6.56934 4.37956 6.56934

57 2 2.18978 2.18978 0.0

58 2 2.18978 2.18978 4.37956

59 2 2.18978 6.56934 0.0

60 2 2.18978 6.56934 4.37956

61 2 6.56934 2.18978 0.0

62 2 6.56934 2.18978 4.37956

63 2 6.56934 6.56934 0.0

64 2 6.56934 6.56934 4.37956

The inputs you provide have multiple issues. They all can be eliminated with proper input file debugging. Most certainly, this input will not run without NEB because of those. So what you are telling us is not correct or that data you provide is not the data you use. This is very annoying. If you want accurate and competent help, you must make certain that you provide accurate and consistent information. If you will fail to do so in the future, you will risk that your questions are ignored.

  • there are typos
    • it is “boundary” not “boundry”
    • it is “min_style” not “min_syle”
  • your data file is called “sic.initial”, yet your input tries to load “sic_64_initial”
  • you are issuing a “reset_timestep” command with an active dump. that is not allowed (anymore) as it would lead to inconsistent output. you have to do an undump first.
  • your sic.final file is written in an incorrect format
  • NEB calculations require an atom map. So an “atom_modify map array” command is required

All of this can be easily learned from the error messages that LAMMPS produces.

1 Like

Dear Dr. akohlmey
I am really sorry about the message ,I wish I would’ve not send the message, it just happened because LAMMPS was not producing error messages with “mpirun -np …” command. Infact when I am reading the message I have already fixed it, as I tried to run just minimisation without -partition but it was a bad day ,It won’t happen again I am sorry for the mess.
I highly appreciate your genuine and timely help.
please accept my best regards