deepmd.tf.utils.spin

Module Contents

Classes

Spin

Class for spin.

class deepmd.tf.utils.spin.Spin(use_spin: List[bool] | None = None, spin_norm: List[float] | None = None, virtual_len: List[float] | None = None)[source]

Class for spin.

Parameters:
use_spin

Whether to use atomic spin model for each atom type

spin_norm

The magnitude of atomic spin for each atom type with spin

virtual_len

The distance between virtual atom representing spin and its corresponding real atom for each atom type with spin

build(reuse=None, suffix='')[source]

Build the computational graph for the spin.

Parameters:
reuse

The weights in the networks should be reused when get the variable.

suffix

Name suffix to identify this descriptor

Returns:
embedded_types

The computational graph for embedded types

get_ntypes_spin() int[source]

Returns the number of atom types which contain spin.

get_use_spin() List[bool][source]

Returns the list of whether to use spin for each atom type.

get_spin_norm() List[float][source]

Returns the list of magnitude of atomic spin for each atom type.

get_virtual_len() List[float][source]

Returns the list of distance between real atom and virtual atom for each atom type.