Commit c72ebd89 authored by Gao, Xiang's avatar Gao, Xiang Committed by Farhad Ramezanghorbani
Browse files

Docs about unit (#389)

parent c41581a3
......@@ -32,6 +32,8 @@ model = torchani.models.ANI1ccx()
# preceding ``1`` in the shape is here to support batch processing like in
# training. If you have ``N`` different structures to compute, then make it
# ``N``.
#
# The coordinates are in Angstrom, and the energies you get are in Hartree
coordinates = torch.tensor([[[0.03192167, 0.00638559, 0.01301679],
[-0.83140486, 0.39370209, -0.26395324],
[-0.66518241, -0.84461308, 0.20759389],
......
......@@ -389,10 +389,11 @@ class AEVComputer(torch.nn.Module):
and pbc is boolean vector of size 3 storing if pbc is enabled
for that direction.
The coordinates, and cell are in Angstrom.
Returns:
NamedTuple: Species and AEVs. species are the species from the input
unchanged, and AEVs is a tensor of shape
``(C, A, self.aev_length())``
unchanged, and AEVs is a tensor of shape ``(C, A, self.aev_length())``
"""
species, coordinates = input_
......
......@@ -101,6 +101,9 @@ class BuiltinNet(torch.nn.Module):
Returns:
species_energies: energies for the given configurations
.. note:: The coordinates, and cell are in Angstrom, and the energies
will be in Hartree.
"""
species_aevs = self.aev_computer(species_coordinates, cell=cell, pbc=pbc)
species_energies = self.neural_networks(species_aevs)
......
......@@ -9,12 +9,14 @@ class SpeciesEnergies(NamedTuple):
class ANIModel(torch.nn.Module):
"""ANI model that compute properties from species and AEVs.
"""ANI model that compute energies from species and AEVs.
Different atom types might have different modules, when computing
properties, for each atom, the module for its corresponding atom type will
energies, for each atom, the module for its corresponding atom type will
be applied to its AEV, after that, outputs of modules will be reduced along
different atoms to obtain molecular properties.
different atoms to obtain molecular energies.
The resulting energies are in Hartree.
Arguments:
modules (:class:`collections.abc.Sequence`): Modules for each atom
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment