torchani.neurochem#

This module is part of the Legacy API of TorchANI 2 and should not be used in new code. It should only be used if you need to interface with previously trained ANI models in the NeuroChem format. It contains tools for loading files in the NeuroChem format, the original file format used in the first ANI article.

Functions

load_aev_constants_and_symbols

load_aev_computer_and_symbols

load_sae

Returns a self-energy calculator, with self energies from NeuroChem sae file

load_member

Returns a torchani.nn.ANINetworks loaded from NeuroChem's network directory.

load_ensemble

Loads torchani.nn.Ensemble from NeuroChem's dirs with a given prefix

load_model_from_name

load_model_from_info_file

modules_from_model_name

Creates the necessary modules to generate a pre-trained ANI model

modules_from_info_file

Creates the necessary modules to generate a pre-trained ANI model, parsing the data from legacy neurochem files.

download_model_parameters

torchani.neurochem.load_sae(filename)[source]#

Returns a self-energy calculator, with self energies from NeuroChem sae file

The constructed object is of class torchani.sae.SelfEnergy, and can be used to calculate the self atomic energies of a group of molecules.

torchani.neurochem.load_member(symbols, model_dir)[source]#

Returns a torchani.nn.ANINetworks loaded from NeuroChem’s network directory.

Parameters:
  • symbols (Sequence[str]) – A tuple or list of strings that are valid chemical symbols. (case sensitive).

  • model_dir (str | Path) – Dir storing network configurations.

torchani.neurochem.load_ensemble(symbols, prefix, count)[source]#

Loads torchani.nn.Ensemble from NeuroChem’s dirs with a given prefix

Parameters:
  • symbols (Sequence[str]) – A tuple or list of strings that are valid chemical symbols. (case sensitive).

  • prefix (str | Path) – Prefix of paths of directory where networks configurations are stored.

  • count (int) – Number of models in the ensemble.

torchani.neurochem.modules_from_model_name(model_name, model_index=None, strategy='pyaev')[source]#

Creates the necessary modules to generate a pre-trained ANI model

Parses data from legacy neurochem files, which are fetched according to the model name.

torchani.neurochem.modules_from_info_file(info_file, model_index=None, strategy='pyaev')[source]#

Creates the necessary modules to generate a pre-trained ANI model, parsing the data from legacy neurochem files.