Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
spozdn committed May 15, 2024
1 parent ee747db commit 9876dfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/single_struct_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def __init__(self, path_to_calc_folder, checkpoint="best_val_rmse_both_model", d
self.model = model
self.hypers = hypers
self.all_species = all_species
self.device = device


def forward(self, structure):
Expand All @@ -52,6 +53,7 @@ def forward(self, structure):

graph = molecule.get_graph(molecule.get_max_num(), self.all_species, molecule.get_num_k())
graph.batch = torch.zeros(graph.num_nodes, dtype = torch.long, device = graph.x.device)
graph = graph.to(self.device)
prediction_energy, prediction_forces = self.model(graph, augmentation = False, create_graph = False)

compositional_features = get_compositional_features([structure], self.all_species)[0]
Expand Down

0 comments on commit 9876dfa

Please sign in to comment.