mir-group / pair_nequip

MIT License
41 stars 12 forks source link

lmp command error #16

Open steven60411 opened 2 years ago

steven60411 commented 2 years ago

Hi! This is Steven When I try to run lmp -in water_minimize.in it will show this error:

LAMMPS (17 Feb 2022)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
  using 1 OpenMP thread(s) per MPI task
units   real
atom_style atomic
newton off
thermo 1
read_data water.lmp
Reading data file ...
  triclinic box = (0 0 0) to (12.4447 12.4447 12.4447) with tilt (0 0 0)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
  192 atoms
  read_data CPU = 0.006 seconds

pair_style      nequip
ERROR: Unrecognized pair style 'nequip' (src/force.cpp:279)
Last command: pair_style        nequip

My pytorch version is 1.10.2 Can anyone help? Thanks!

Sincerely, Steven

anjohan commented 2 years ago

Hi Steven,It looks like you haven't done the patching step (or something went wrong in the middle of it), and the NequIP pair style hasn't been added to lammps correctly.Try following the patching instructions in the README.Best wishes,Anders On Apr 1, 2022 18:13, steven60411 @.***> wrote: Hi! This is Steven When I try to run lmp -in it will show this error: LAMMPS (17 Feb 2022) OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) using 1 OpenMP thread(s) per MPI task units real atom_style atomic newton off thermo 1 read_data water.lmp Reading data file ... triclinic box = (0 0 0) to (12.4447 12.4447 12.4447) with tilt (0 0 0) 1 by 1 by 1 MPI processor grid reading atoms ... 192 atoms read_data CPU = 0.006 seconds pair_style nequip ERROR: Unrecognized pair style 'nequip' (src/force.cpp:279) Last command: pair_style nequip My pytorch version is 1.10.2 Can anyone help? Thanks! Sincerely, Steven

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

steven60411 commented 2 years ago

Thanks! Also, when I try to do another data file, it looks like lammps and nequip works well but it will show this kind of error:

LAMMPS (17 Feb 2022)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
  using 1 OpenMP thread(s) per MPI task
units   real
atom_style atomic
newton off
thermo 1
read_data water52.vasp
Reading data file ...
  orthogonal box = (-1.143 -1.121 -1.06) to (13.768 13.601 13.828)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
ERROR on proc 0: Invalid atom type in Atoms section of data file (src/atom_vec.cpp:1771)
Last command: read_data water52.vasp

My input file is modified from the tutorial, only change the atom type for water:

units   real
atom_style atomic
newton off
thermo 1
read_data water52.vasp

pair_style      nequip
pair_coeff      * * /mnt/c/Users/StevenFang/lammps/build/lammps_run/water-aimd-vasp.pth H O
mass              1 1.00794
mass              2 15.9994

neighbor 1.0 bin
neigh_modify delay 5 every 1

minimize 0.0 1.0e-8 10000 1000000
write_dump all custom output.dump id type x y z fx fy fz

And here is part of my data file (There are more H and O atoms below):

LAMMPS data file. CGCMM style. atom_style atomic generated by VMD/TopoTools v1.5 on Mon Mar 28 11:51:29 PDT 2022
156 atoms
2 atoms types
-1.143000 13.768000  xlo xhi
-1.121000 13.601000  ylo yhi
-1.060000 13.828000  zlo zhi

Atoms

1 1 4.738000 4.976000 3.873000 # H
2 1 3.298000 5.690000 3.581000 # H
3 2 4.286000 5.832000 3.620000 # O
4 1 2.376000 1.093000 3.727000 # H
5 1 0.773000 1.381000 3.841000 # H
6 2 1.466000 0.749000 3.496000 # O
7 1 10.569000 1.330000 8.925000 # H
8 1 12.063000 1.614000 8.328000 # H
9 2 11.242000 1.051000 8.239000 # O
10 1 8.900000 10.247000 1.286000 # H
11 1 7.812000 9.390000 2.153000 # H
12 2 7.994000 10.268000 1.711000 # O
13 1 4.294000 4.801000 8.697000 # H
14 1 2.961000 4.168000 9.397000 # H
15 2 3.734000 4.789000 9.526000 # O

I've google for same situation as mine but nothing helps, and I've tried different methods for changing the data file and input file, but when I did this it will show the error like these: ERROR: Incorrect atom format in data file (src/atom.cpp:1067) , ERROR on proc 0: Expected integer parameter instead of 'H' in input script or data file (src/atom_vec.cpp:1748)

I'm new to lammps so maybe it's just a simple problem, but I just can't figure out which part to fix :( Thanks!

Sincerely, Steven

steven60411 commented 2 years ago

@anjohan And for the first one I think I've done the patching steps before Cause when I run the patching command it shows:

(NequIP) steven60411@steven:/mnt/c/Users/StevenFang/pair_nequip$ ./patch_lammps.sh /mnt/c/Users/StevenFang/lammps/
This LAMMPS installation _seems_ to already have been patched; please check it!

Also forgot to tell, I'm using the "release" branch of lammps, and my torch version is initially 1.9.1, I update it to 1.10.2 before I run the lmp command, would these be the potential factors?