From 3377e3454b3d35b3e0244c01996f5c2c1026230d Mon Sep 17 00:00:00 2001 From: jzhang <39238584+jzhang-github@users.noreply.github.com> Date: Tue, 19 Dec 2023 13:26:41 +0800 Subject: [PATCH] fix a bug in `AgatCalculator` This bug will not affect model predictions and relaxed structures. --- .spyproject/config/workspace.ini | 2 +- agat/app/app.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.spyproject/config/workspace.ini b/.spyproject/config/workspace.ini index f59f9d28..b46ba9fc 100644 --- a/.spyproject/config/workspace.ini +++ b/.spyproject/config/workspace.ini @@ -4,7 +4,7 @@ save_data_on_exit = True save_history = True save_non_project_files = False project_type = 'empty-project-type' -recent_files = ['agat\\test\\test.py', 'agat\\test\\test_graph_build_method.py'] +recent_files = ['agat\\test\\test.py'] [main] version = 0.2.0 diff --git a/agat/app/app.py b/agat/app/app.py index b0cda6fd..081695df 100644 --- a/agat/app/app.py +++ b/agat/app/app.py @@ -104,6 +104,9 @@ def calculate(self, atoms=None, properties=None, system_changes=['positions', 'n if properties is None: properties = self.implemented_properties + if atoms is not None: + self.atoms = atoms.copy() + # read graph graph, info = self.cg.get_graph(atoms) graph = graph.to(self.device)