High-performance TorchScript GNN inference engine for atomic systems.
More...
#include <TorchGNNModel.hpp>
High-performance TorchScript GNN inference engine for atomic systems.
◆ TorchGNNModel() [1/3]
| correlation::mlip::TorchGNNModel::TorchGNNModel |
( |
std::string | model_path, |
|
|
std::string | device = "cpu", |
|
|
real_t | cutoff = static_cast<real_t>(5.0) ) |
|
explicit |
Constructs a TorchScript GNN model from a serialized .pt file.
- Parameters
-
| [in] | model_path | Path to the compiled TorchScript model artifact (.pt). |
| [in] | device | Execution target device (e.g. "cpu", "cuda", "cuda:0"). |
| [in] | cutoff | Radial neighbor cutoff radius in Angstroms (default: 5.0). |
◆ ~TorchGNNModel()
| correlation::mlip::TorchGNNModel::~TorchGNNModel |
( |
| ) |
|
|
overridedefault |
◆ TorchGNNModel() [2/3]
| correlation::mlip::TorchGNNModel::TorchGNNModel |
( |
TorchGNNModel && | | ) |
|
|
defaultnoexcept |
◆ TorchGNNModel() [3/3]
| correlation::mlip::TorchGNNModel::TorchGNNModel |
( |
const TorchGNNModel & | | ) |
|
|
delete |
◆ cutoff()
| real_t correlation::mlip::TorchGNNModel::cutoff |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Gets the radial neighbor cutoff radius.
- Returns
- Cutoff distance in Angstroms.
◆ evaluate()
Evaluates potential properties (energy, forces, LDOS) on an atomic Cell.
- Parameters
-
| [in] | cell | Atomic configuration cell. |
- Returns
- MLIPOutput containing atomic forces and site-resolved LDOS bins.
Implements correlation::mlip::MLIPInterface.
◆ getModelName()
| std::string correlation::mlip::TorchGNNModel::getModelName |
( |
| ) |
const |
|
nodiscardoverridevirtual |
◆ isLoaded()
| bool correlation::mlip::TorchGNNModel::isLoaded |
( |
| ) |
const |
|
nodiscardnoexcept |
Checks if LibTorch backend is compiled and model successfully loaded.
- Returns
- True if model is ready for forward evaluation.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setCutoff()
| void correlation::mlip::TorchGNNModel::setCutoff |
( |
real_t | cutoff | ) |
|
|
inlinenoexcept |
Sets the radial neighbor cutoff radius.
- Parameters
-
| [in] | cutoff | New cutoff distance in Angstroms. |
◆ cutoff_
| real_t correlation::mlip::TorchGNNModel::cutoff_ {static_cast<real_t>(5.0)} |
|
private |
◆ device_str_
| std::string correlation::mlip::TorchGNNModel::device_str_ |
|
private |
◆ impl_
| std::unique_ptr<Impl> correlation::mlip::TorchGNNModel::impl_ |
|
private |
◆ model_path_
| std::string correlation::mlip::TorchGNNModel::model_path_ |
|
private |
The documentation for this class was generated from the following files: