CompPhysVienna / n2p2

n2p2 - A Neural Network Potential Package
https://compphysvienna.github.io/n2p2/
GNU General Public License v3.0
214 stars 81 forks source link

[WIP] Implement additional structure and force weights in the loss function #187

Open cschran opened 1 year ago

cschran commented 1 year ago

This PR implements two additional weights to be considered in the loss function of NNP optimizations.

Configurations can be weighted with a new keyword weight in the input.data file as proposed in #91. Individual atomic force components can be weighted via the unused 6th column of the atom keyword in input.data.

The PR works as expected, but there are two aspects that require discussion:

  1. In order to restore default behavior for existing data sets, atomic force weights of 0 are converted to 1.
  2. Weights are only applied on the error and not in the Jacobian, as the latter one introduced deteriorating quality.

Resolves #91, resolves #121.