mfkasim1 / xcnn

xc deep neural network (XCNN) with a differentiable DFT
8 stars 4 forks source link

Add xcmodels_pcNN.py #3

Closed ml-electron-project closed 2 years ago

ml-electron-project commented 2 years ago

I added the xc model of the constrained meta-GGA.

As I did not figure out how "nnmodel: torch.nn.Module" is defined, I left the NN definitions in the class: NN is defined in the latter part of init and shifted_softplus0 (activation function), and thus called by forward and forward_c. You may change those parts when you train the NN weights.

"load" reads parameters from external numpy savedata, but this is not required for the training.

mfkasim1 commented 2 years ago

Thanks, the nnmodel is not the required part in your case. I used it because I modeled the xc as a hybrid of NN + ordinary xc. As long as your class define the abstractmethods, that should be fine.