From cb7257d7d122d5b7123e2408427355e9a4d82f40 Mon Sep 17 00:00:00 2001 From: Bruno Stegani Date: Wed, 29 Jul 2026 14:06:02 +0200 Subject: [PATCH] fixed Hbond interactions and H-H repulsion in ffnonbonded --- src/multiego/interaction_matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/multiego/interaction_matrix.py b/src/multiego/interaction_matrix.py index 69e7a451..99acbe84 100644 --- a/src/multiego/interaction_matrix.py +++ b/src/multiego/interaction_matrix.py @@ -236,7 +236,7 @@ def define_special_nonlocal_dict(self): for atom_pair in self.atmat["atom_pair"].unique(): atp1, atp2 = atom_pair.split("_") # write only H-O interaction, skip all the rest - if (atp1 == "H" and atp2 != "O") or (atp2 == "H" and atp1 != "O"): + if (atp1 == "H" and atp2 not in ["O", "H"]) or (atp2 == "H" and atp1 not in ["O", "H"]): continue energy = self.atmat.loc[self.atmat["atom_pair"]==atom_pair, "energy"].values[0] sigma = self.atmat.loc[self.atmat["atom_pair"]==atom_pair, "exp_aver"].values[0] / 2**(1/6) @@ -260,7 +260,7 @@ def nonlocal_matrix(self): self.atmat["energy"] = np.array(self.regall(self.atmat["probability"].to_numpy(), 1, self.emax, self.pth)) self.atmat.loc[self.atmat["atom_pair"]=="O_H", "energy"] = 0.9 self.atmat.loc[self.atmat["atom_pair"]=="O_N", "energy"] = 0.9 - self.atmat.loc[self.atmat["atom_pair"]=="O_C", "energy"] = 0.9 + self.atmat.loc[self.atmat["atom_pair"]=="N_C", "energy"] = 0.9 self.atmat.loc[self.atmat["atom_pair"]=="O_O", "energy"] = 0.08 self.atmat.loc[self.atmat["atom_pair"]=="N_N", "energy"] = 0.08 self.atmat.loc[self.atmat["atom_pair"]=="C_C", "energy"] = 0.08