calculate_elastic_tensor¶
- torch_sim.elastic.calculate_elastic_tensor(state, model, *, bravais_type=BravaisType.triclinic, max_strain_normal=0.01, max_strain_shear=0.06, n_deform=5, autobatcher=False, pbar=False)[source]¶
Calculate the elastic tensor of a structure.
- Parameters:
model (ModelInterface) – Model to use for stress calculation
state (OptimState) – SimState containing the reference structure
bravais_type (BravaisType) – Bravais type of the structure
max_strain_normal (float) – Maximum normal strain
max_strain_shear (float) – Maximum shear strain
n_deform (int) – Number of deformations
autobatcher (BinningAutoBatcher | bool) – Optional autobatcher for batching calculations. If True, automatically determines batch sizes based on available memory. If False (default), processes all deformations in a single batch. If a BinningAutoBatcher instance, uses the provided configuration.
pbar (bool | dict[str, Any]) – Show a progress bar. If True, displays default progress bar. If a dict, passed as kwargs to tqdm. Defaults to False.
- Returns:
Elastic tensor
- Return type: