Skip to content

Commit

Permalink
Remove the TorchANI import from the top level (openmm#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raimondas Galvelis committed Dec 10, 2021
1 parent a830fa1 commit 93a7836
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pytorch/EnergyShifter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@

import torch
from torch import Tensor
from torchani.nn import SpeciesConverter
from torchani.utils import EnergyShifter, SpeciesEnergies
from typing import Optional, Tuple
from typing import NamedTuple, Optional, Tuple

class SpeciesEnergies(NamedTuple):
species: Tensor
energies: Tensor

class TorchANIEnergyShifter(torch.nn.Module):

from torchani.nn import SpeciesConverter # https://github.com/openmm/NNPOps/issues/44
from torchani.utils import EnergyShifter # https://github.com/openmm/NNPOps/issues/44

def __init__(self, converter: SpeciesConverter, shifter: EnergyShifter, atomicNumbers: Tensor) -> None:

super().__init__()
Expand Down

0 comments on commit 93a7836

Please sign in to comment.