From dccd256354f200d9a5d3849ffe47d96867508eb0 Mon Sep 17 00:00:00 2001 From: Greg Jones Date: Sat, 17 Feb 2024 10:41:57 -0500 Subject: [PATCH] Of course the gradient doesn't need to be "translated". --- pysisyphus/calculators/CFOUR.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pysisyphus/calculators/CFOUR.py b/pysisyphus/calculators/CFOUR.py index 95f326ce3..31441d779 100644 --- a/pysisyphus/calculators/CFOUR.py +++ b/pysisyphus/calculators/CFOUR.py @@ -129,15 +129,12 @@ def rotate_gradient(self, text, gradient): cfour_coords_3d = self.read_geom(text) pysis_coords_3d = np.reshape(self.input_coords, (-1,3)) - cfour_centroid = self.calc_centroid(cfour_coords_3d) pysis_centroid = self.calc_centroid(pysis_coords_3d) rot_matrix = self.calc_rot_matrix(cfour_coords_3d, pysis_coords_3d, cfour_centroid, pysis_centroid) - t = self.calc_translation(rot_matrix, cfour_centroid, pysis_centroid) - - return (gradient @ rot_matrix.T) + t + return (gradient @ rot_matrix.T) def read_geom(self, text): regex = r"Coordinates used in calculation \(QCOMP\)(.+)Interatomic distance matrix" @@ -173,9 +170,6 @@ def calc_rot_matrix(self, cfour_coords_3d, pysis_coords_3d, cfour_centroid, pysi return R - def calc_translation(self, rotation_matrix, cfour_centroid, pysis_centroid): - return pysis_centroid - rotation_matrix @ cfour_centroid - def run_calculation(self, atoms, coords, calc_type): self.input_coords = coords ## For use later to rotate CFOUR gradient to the pysisyphus frame inp = self.prepare_input(atoms, coords, calc_type)