File size: 2,199 Bytes
fefb9a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# ruff: noqa
"""MagNET predicts NMR shieldings using equivariant neural networks.

| function | what you get |
|---|---|
| `predict_shifts` | <sup>1</sup>H and <sup>13</sup>C chemical shifts (ppm) in a specific solvent using MagNET-Zero/MagNET-PCM |
| `predict_shieldings` | <sup>1</sup>H and <sup>13</sup>C shieldings (ppm) in the gas phase |
| `implicit_solvent_correction` | shieldings(PCM=chloroform) - shieldings(gas phase) |
| `explicit_solvent_correction` | shieldings(solute+solvents) - shieldings(solute) |

**Inputs and outputs**

- One molecule: array of `atomic_numbers` (e.g. 6 for carbon) and
  `coordinates` (an N-by-3 array of xyz positions in Angstrom, a numpy array or a nested list). You
  get one numpy array back, one value per atom.
- Many molecules: pass a list of each, and you get a list of arrays back.

**Geometries** MagNET-Zero and MagNET-PCM expect AIMNet2-optimized geometries.

**Supported Solvents**

| solvent | `predict_shifts` | `implicit_solvent_correction` | `explicit_solvent_correction` |
|---|:---:|:---:|:---:|
| tetrahydrofuran | βœ“ | | |
| dichloromethane | βœ“ | | |
| chloroform | βœ“ | βœ“ | βœ“ |
| toluene | βœ“ | | |
| benzene | βœ“ | | βœ“ |
| chlorobenzene | βœ“ | | |
| acetone | βœ“ | | |
| dimethylsulfoxide | βœ“ | | |
| acetonitrile | βœ“ | | |
| trifluoroethanol | βœ“ | | |
| methanol | βœ“ | | βœ“ |
| water | βœ“ | | βœ“ |

`implicit_solvent_correction` predicts only the chloroform correction; `predict_shifts` linearly scales it to the other solvents.

**Shared options** (all four functions):

- `n_passes` (default `10`): average out equivariance error over `n_passes` forward passes
- `symmetrize` (default `True`): if True, average over `n_passes` on the input geometry and `n_passes` on the mirror image of the input geometry
- `device` (default `None`): where to run, a torch device or a string like `"cpu"` or `"cuda"`; uses GPU if available

"""
__docformat__ = "google"

from .api import (predict_shifts, predict_shieldings, implicit_solvent_correction,
                  explicit_solvent_correction)

__all__ = ["predict_shifts", "predict_shieldings", "implicit_solvent_correction",
           "explicit_solvent_correction"]