MDIL-SNU / SevenNet

SevenNet - a graph neural network interatomic potential package supporting efficient multi-GPU parallel molecular dynamics simulations.
https://pubs.acs.org/doi/10.1021/acs.jctc.4c00190
GNU General Public License v3.0
133 stars 17 forks source link

Does SevenNet support to run parallel in ASE? #77

Closed thangckt closed 2 months ago

thangckt commented 3 months ago

Dear Developers,

I want to ask whether SevenNet support to run parallel in ASE? I try to run a simple scipt as below,

from ase.build import molecule
from ase.optimize import BFGS
from sevenn.sevennet_calculator import SevenNetCalculator

atoms = molecule("H2O")
calc = SevenNetCalculator("7net-0_11July2024", device="cpu")

atoms.calc = calc
opt = BFGS(atoms)
opt.run(fmax=0.01, steps=2)

and from the logfile below, it is seemly that there is no MPI support. May I wrong?

      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
      Step     Time          Energy          fmax
BFGS:    0 20:50:40      -14.093515        0.154410
BFGS:    1 20:50:41      -14.093858        0.035504
BFGS:    1 20:50:41      -14.093858        0.035504
BFGS:    1 20:50:41      -14.093858        0.035504
BFGS:    1 20:50:41      -14.093858        0.035504
BFGS:    1 20:50:41      -14.093858        0.035504
BFGS:    1 20:50:41      -14.093858        0.035504
BFGS:    1 20:50:41      -14.093858        0.035504
BFGS:    1 20:50:41      -14.093858        0.035504

Can you have a little guide? Thank you so much

YutackPark commented 3 months ago

We don't support parallel MD in ASE. SevenNet's parallelism is built on top of spatial decomposition algorithm, which is missing in ASE. You need LAMMPS for parallel MD (the compilation and usage guide is on README.md).