lanl / hippynn

python library for atomistic machine learning
https://lanl.github.io/hippynn/
Other
59 stars 22 forks source link

'Glue-on' Method for damping Coulomb Interactions Locally. #16

Closed sakibmatin closed 1 year ago

sakibmatin commented 1 year ago

Work in Progress; not ready to merge.

Uses the 'complement' of the cosine cutoff in hipnn for smooth cross-over from short-range hipnn energy predictions to long range coulomb energy predictions.

No long-range regularization (Wolf, Shifted-force, Ewald) is implemented in this class. Perhaps it will be best have separate classes for short-range 'damping' and long-range 'screening', which may be combined by the ScreenedCoulombEnergy?

lubbersnick commented 1 year ago

What things are needed to move this from WIP to ready?

sakibmatin commented 1 year ago

This PR can be merged.

The LocalDampingCosine(...) is called as a specific type of screening with in the physics.ScreenedCoulombEnergyNode(...) as follows:

  coulomb_energy = physics.ScreenedCoulombEnergyNode(
      "cEnergy",
      # _input_names = "charges", "pair_dist", "pair_first", "pair_second", "mol_index", "n_molecules"
      (atom_charges,
          pairfinder.pair_dist, pairfinder.pair_first, pairfinder.pair_second,
          padidxer.mol_index, padidxer.n_molecules),
      energy_conversion=energy_conv, 
      screening=LocalDampingCosine(alpha=alpha), 
      cutoff_distance=coulomb_r_max
  )
sakibmatin commented 1 year ago

I will write a separate class (future PR?) which allows the user to 'combine' multiple screening (e.g. LocalDampingCosine and WolfScreening) classes before being passed into physics.ScreenedCoulombEnergyNode(...).

lubbersnick commented 1 year ago

Ok, thanks. you can do a new PR for that feature.