SoftSphereMultiModel¶
- class torch_sim.models.soft_sphere.SoftSphereMultiModel(atomic_numbers, sigma_matrix=None, epsilon_matrix=None, alpha_matrix=None, device=None, dtype=torch.float64, *, pbc=True, compute_forces=True, compute_stress=False, per_atom_energies=False, per_atom_stresses=False, use_neighbor_list=True, neighbor_list_fn=torchsim_nl, cutoff=None, retain_graph=False)[source]¶
Bases:
PairPotentialModelMulti-species soft-sphere potential model.
Uses
MultiSoftSpherePairFninternally to look up per-species-pair parameters from matrices.Example:
model = SoftSphereMultiModel( atomic_numbers=torch.tensor([18, 36]), sigma_matrix=torch.tensor([[1.0, 0.8], [0.8, 0.6]]), epsilon_matrix=torch.tensor([[1.0, 0.5], [0.5, 2.0]]), compute_forces=True, ) results = model(sim_state)
- Parameters:
atomic_numbers (Tensor)
sigma_matrix (Tensor | None)
epsilon_matrix (Tensor | None)
alpha_matrix (Tensor | None)
device (device | None)
dtype (dtype)
compute_forces (bool)
compute_stress (bool)
per_atom_energies (bool)
per_atom_stresses (bool)
use_neighbor_list (bool)
neighbor_list_fn (Callable)
cutoff (float | None)
retain_graph (bool)