coarse-graining / cgnet

learning coarse-grained force fields
BSD 3-Clause "New" or "Revised" License
57 stars 26 forks source link

Repulsion prior documentation #199

Open jasonzzj97 opened 3 years ago

jasonzzj97 commented 3 years ago

Hi,

There are inconsistent descriptions of RepulsionLayer comments and the actual calculation formula.

U_repulsion_ij = (sigma_{ij} / r_{ij}) ^ exp_{ij}

and

energy = torch.sum((self.repulsion_parameters[0, :]/in_feat)
                           ** self.repulsion_parameters[1, :],
                           1).reshape(n, 1) / 2
nec4 commented 3 years ago

Thanks for finding this! The repulsion prior is very simple, so for decent initial repulsion parameter choices I believe the network should be able learn corrections to the prior if needed. Regardless, the factor of two should not be there. I will add it to my list of things to do.