CederGroupHub / chgnet

Pretrained universal neural network potential for charge-informed atomistic modeling https://chgnet.lbl.gov
https://doi.org/10.1038/s42256-023-00716-3
Other
220 stars 60 forks source link

parallel relaxation #73

Closed bkmi closed 11 months ago

bkmi commented 11 months ago

Dear CHGNet Developers,

Is there capacity for the model to relax several crystal structures at once? It seems computations of energy, forces, and stress can easily be batched, but due to the dependence on the ASECalculator I don't see a trivial way to relax in parallel. Did I just miss it?

Thank you, Ben

BowenD-UCB commented 11 months ago

The current parralel relaxation can be achieved with parallel GPU packages like RAY read: https://docs.ray.io/en/latest/ray-core/tasks/using-ray-with-gpus.html

Or you can simply submit multiple relaxation scripts.

While CHGNet naturally supports batched forward of multiple structures, batched-relxation is challenging due to:

  1. There is no ASE support for this.
  2. It would require the relaxation to be synchronous, which is not likely with batched structures
janosh commented 11 months ago

Just to leave a note here that we welcome any external contributions that implement using CHGNet's multi-structure forward pass to draw from a pool of initial structures and relax them concurrently as previous structures finish.

CHGNet Batch Relaxation