PND
|
Public Member Functions | |
void | setCheckPoint (SubSystem checkPointState) |
std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > | Loss (torch::Tensor t_seq, std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > icfs, torch::Tensor H0, torch::Tensor kineticEnergy, torch::Tensor potentialEnergy, int n, int Np, int d) |
std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > | UpdateParamsNADAM (torch::Tensor t_seq, std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > icfs, torch::Tensor velocities, torch::Tensor S, torch::Tensor totalEnergy, torch::Tensor kineticEnergy, torch::Tensor potentialEnergy, int epoch, int n, int Np, int d, double alpha, double epsilon, torch::Tensor beta) |
std::pair< torch::Tensor, torch::Tensor > | mainTrain (torch::Tensor params, torch::Tensor t_seq, std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > icfs, int num_epochs, torch::Tensor totalEnergy, torch::Tensor kineticEnergy, torch::Tensor potentialEnergy, int n, int Np, int d, double learn_rate, double momentum) |
![]() | |
PND () | |
void | defineParams (int numberOfAtoms) |
std::pair< torch::Tensor, torch::Tensor > | LossPreTrain (torch::Tensor t_seq, std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > icfs, int n, int Np, int d) |
std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > | UpdatePreParamsNADAM (torch::Tensor t_seq, std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > icfs, torch::Tensor velocities, torch::Tensor S, int epoch, int n, int Np, int d, double alpha=0.001, double epsilon=pow(10, -7), torch::Tensor beta=torch::tensor({0.999, 0.999})) |
std::pair< torch::Tensor, torch::Tensor > | PreTrain (torch::Tensor t_seq, std::tuple< torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor > icfs, int num_epochs, int n, int Np, int d, double learn_rate=0.001, double momentum=0.99) |
Public Attributes | |
SubSystem | checkPointState |
![]() | |
int | PreTrainEpochs |
int | MainTrainEpochs |
int | StepTrain |
int | nodes |
torch::Tensor | params |
scratch_pad.cpp is an examlpe to demonstrates how users implement loss functions, specify intial and boundary conditions, and conservation laws for their systems
|
inlinevirtual |
Define a Loss function for the network which is a set of DEs governing the evolution of the system. Only method declaration provided, method must be defined when user's working class inherits from PND
t_seq | time sequences for which the pre-training is carried out |
icfs | initial and final positions and velocites that are to be used for the pre-training task |
totalEnergy | system total energy across time steps |
kineticEnergy | system kinetic energy across time steps |
potentialEnergy | system potential energy across time steps |
n | Number of neurons in the NN |
Np | Number of atoms in the MD system |
d | dimensionality of the space (d = 3 when data in x,y,z co-ordinates is available) |
Reimplemented from PND.
|
inlinevirtual |
Routine to follow for main-training the NN, i.e., training for the target data. Users may decide to call their parameter updating algorithm implementation in each training iteration.
params | inital parameters of the NN which will be trained |
t_seq | time sequences for which the pre-training is carried out |
icfs | initial and final positions and velocites that are to be used for the pre-training task |
num_epochs | number of epochs for which training is to be carried out |
totalEnergy | system total energy across time steps |
kineticEnergy | system kinetic energy across time steps |
potentialEnergy | system potential energy across time steps |
n | number of neurons in the NN |
Np | number of atoms in the MD system |
d | number of atoms in the MD system |
learn_rate | learning rate for optimizer |
momentum | parameter to pass to the optimizer that uses momentum |
Reimplemented from PND.
|
inlinevirtual |
Defines an optimizer for adjusting the parameters in each main training iteration. We provide the declaration and method must be defined when user's working class inherits from PND
t_seq | time sequences for which the pre-training is carried out |
icfs | initial and final positions and velocites that are to be used for the pre-training task |
velocities | |
S | |
totalEnergy | system total energy across time steps |
kineticEnergy | system kinetic energy across time steps |
potentialEnergy | system potential energy across time steps |
epoch | defines the number of steps |
n | number of neurons in the NN |
Np | number of atoms in the MD system |
d | dimensionality of the space (d = 3 when data in x,y,z co-ordinates is available) |
alpha | parameters for optimizers |
epsilon | constant for stability |
beta | parameters for optimizers |
Reimplemented from PND.