Title
Standard Calculators
FandeCalc
- class fande.ase.FandeCalc(*args: Any, **kwargs: Any)
See for example: Calculator to be used with Atomic Simulation Environment.
See example calculator: https://gitlab.com/ase/ase/-/blob/master/ase/calculators/emt.py
- make_forces_errors_plot(atomic_groups=None, titles=None, steps_range=-1, plot_show=True, plot_file=None, wandb_log=True, **kwargs)
Plot forces errors.
- save_predictor(file_name)
Save the predictor to file. Everything is saved, including the model, the trainer, the hparams, and descriptors. Huge file is generated.
Sample loading of predictor: ``` python import torch from fande.ase import FandeCalc
predictor_loaded = torch.load(“/data1/simulations/ML_models/predictor.pt”) fande_calc = FandeCalc(predictor_loaded)
atoms = predictor_loaded.fdm.traj_train[0].copy() atoms.calc = fande_calc
print( atoms.get_potential_energy(), atoms.get_forces() ) ```