sigml.models package
Submodules
sigml.models.EF_Model module
- sigml.models.EF_Model.get_standard_ef_model(ave_neighbor_count, em_dim=32, mul=16, interaction_layers=2, radial_layers=2, radial_neurons=64, lmax=2, weight_path=None, cutoff=4.0, device='cpu')
Get a standard \(E_f\) model
- Parameters:
ave_neighbor_count (int) – The average number of neighbors per atom
em_dim (int) – Embedding dimension, the atomic one-hot representations for each atom are converted to from \(\mathbb{R}^{N_{atoms}\times 118}\) to \(\mathbb{R}^{N_{atoms}\times em\_dim}\) before being fed into network
mul (int) – Multiplicity of neurons within equivariant layers of the neural network. Higher means larger network
interaction_layers (int) – Number of convolutional interaction layers
radial_layers (int) – Number of radial layers for encoding of atomic positions into spherical harmonics representation
radial_neurons (int) – Number of neurons for each radial layer
lmax (int) – Maximum irrep order to consider when building equivariant layers
weight_path (str, optional, default = None) – The path to the weights of the model if model has been previously trained and saved
cutoff (float, optional, default = 4.0) – The cutoff radius of the model when considering neighbors for the graph neural network
device (str, optional, default = "cpu") – The device to build the model on
- Returns:
model – The standard \(E_f\) model
- Return type:
sigml.models.EF_Model.EF_Model
sigml.models.Sig_iws_Model module
- sigml.models.Sig_iws_Model.get_standard_full_sig_model(ave_neighbor_count, leg_lmax, em_dim=64, mul=64, interaction_layers=2, radial_layers=2, radial_neurons=64, lmax=2, orbital_count=5, cutoff=4.0, weight_path=None, device='cpu')
Get a standard \(\Sigma(i\omega)\) model
- Parameters:
ave_neighbor_count (int) – The average number of neighbors per atom
leg_lmax (int) – The maximum angular momentum number \(l_max\) used for the Legendre expansion
em_dim (int) – Embedding dimension, the atomic one-hot representations for each atom are converted to from \(\mathbb{R}^{N_{atoms}\times 118\) to \(\mathbb{R}^{N_{atoms}\times em\_dim}\) before being fed into network
mul (int) – Multiplicity of neurons within equivariant layers of the neural network. Higher means larger network
interaction_layers (int) – Number of convolutional interaction layers
radial_layers (int) – Number of radial layers for encoding of atomic positions into spherical harmonics representation
radial_neurons (int) – Number of neurons for each radial layer
lmax (int) – Maximum irrep order to consider when building equivariant layers
orbital_count (int) – Number of orbitals within correlated subspace for each atoms. Currently only supports atoms of the same orbital count
cutoff (float, optional, default = 4.0) – The cutoff radius of the model
weight_path (str, optional, default = None) – The path to the weights of the model if model has been previously trained and saved
device (str, optional, default = "cpu") – The device to build the model on
- Returns:
model – The standard \(\Sigma(i\omega)\) model
- Return type:
CrystalSelfEnergyNetwork
sigml.models.Sinf_Model module
- sigml.models.Sinf_Model.get_standard_sinf_model(ave_neighbor_count, em_dim=16, mul=32, interaction_layers=2, radial_layers=2, radial_neurons=64, lmax=2, orbital_count=5, cutoff=4.0, weight_path=None, device='cpu')
Get a standard \(\Sigma_{\infty}\) model
- Parameters:
ave_neighbor_count (int) – The average number of neighbors per atom
em_dim (int) – Embedding dimension, the atomic one-hot representations for each atom are converted to from \(\mathbb{R}^{N_{atoms}\times 118\) to \(\mathbb{R}^{N_{atoms}\times em_dim\) before being fed into network
mul (int) – Multiplicity of neurons within equivariant layers of the neural network. Higher means larger network
interaction_layers (int) – Number of convolutional interaction layers
radial_layers (int) – Number of radial layers for encoding of atomic positions into spherical harmonics representation
radial_neurons (int) – Number of neurons for each radial layer
lmax (int) – Maximum irrep order to consider when building equivariant layers
orbital_count (int) – Number of orbitals within correlated subspace for each atoms. Currently only supports atoms of the same orbital count
cutoff (float, optional, default = 4.0) – The cutoff radius of the model
weight_path (str, optional, default = None) – The path to the weights of the model if model has been previously trained and saved
device (str, optional, default = "cpu") – The device to build the model on
- Returns:
model – The standard \(\Sigma_{\infty}\) model
- Return type:
Sinf_Model
sigml.models.network module
- class sigml.models.network.Network(*args: Any, **kwargs: Any)
Bases:
Module
Equivariant neural network class
- Parameters:
irreps_in (e3nn.o3.Irreps or None) – representation of the input features can be set to
None
if nodes don’t have input featuresirreps_hidden (e3nn.o3.Irreps) – representation of the hidden features
irreps_out (e3nn.o3.Irreps) – representation of the output features
irreps_node_attr (e3nn.o3.Irreps or None) – representation of the nodes attributes can be set to
None
if nodes don’t have attributesirreps_edge_attr (e3nn.o3.Irreps) – representation of the edge attributes the edge attributes are \(h(r) Y(\vec r / r)\) where \(h\) is a smooth function that goes to zero at
max_radius
and \(Y\) are the spherical harmonics polynomialslayers (int) – number of gates (non linearities)
max_radius (float) – maximum radius for the convolution
number_of_basis (int) – number of basis on which the edge length are projected
radial_layers (int) – number of hidden layers in the radial fully connected network
radial_neurons (int) – number of neurons in the hidden layers of the radial fully connected network
num_neighbors (float) – typical number of nodes at a distance
max_radius
num_nodes (float) – typical number of nodes in a graph
- forward(data: torch_geometric.data.Data | Dict[str, torch.Tensor]) torch.Tensor
Evaluate the network
- Parameters:
data (torch_geometric.data.Data or dict)
containing (data object)
(atoms) (- pos the position of the nodes)
nodes (- z the attributes of the)
optional
nodes
type (for instance the atom)
optional
belong (- batch the graph to which the node)
optional
- Returns:
x – The output features of the nodes
- Return type:
torch.Tensor