From 2db295947a75ab0347ba0e11b98564da9d228c6a Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com> Date: Sat, 29 Feb 2020 09:08:22 -0700 Subject: Temp fix for adj mat --- ml_exp/representations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ml_exp/representations.py b/ml_exp/representations.py index 5e684314b..5e99627df 100644 --- a/ml_exp/representations.py +++ b/ml_exp/representations.py @@ -242,12 +242,14 @@ size. Arrays are not of the right shape.') def adjacency_matrix(fnm, bonds, forces, + use_forces=False, size=22): """ Calculates the adjacency matrix given the bond list. fnm: first neighbour matrix. bonds: list of bonds (tuple of indexes). forces: list of forces. + use_forces: if the use of forces instead of k_cx should be used. size: compund size. """ n = len(bonds) @@ -264,7 +266,7 @@ def adjacency_matrix(fnm, # Ignore the diagonal. if i != j: if (bond_i[0] in bond_j) or (bond_i[1] in bond_j): - if forces: + if use_forces: am[i, j] = np.dot(forces[i], forces[j]) else: am[i, j] = fnm[bond_i[0], bond_i[1]] -- cgit v1.2.3-70-g09d2