summaryrefslogtreecommitdiff
path: root/c_matrix.py
diff options
context:
space:
mode:
Diffstat (limited to 'c_matrix.py')
-rw-r--r--c_matrix.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/c_matrix.py b/c_matrix.py
index dff638bc5..f6f18976e 100644
--- a/c_matrix.py
+++ b/c_matrix.py
@@ -31,7 +31,7 @@ def c_matrix(mol_data,
as_eig=False,
bohr_radius_units=False):
"""
- Creates the coulomb matrix from the molecule data given.
+ Creates the Coulomb Matrix from the molecule data given.
mol_data: molecule data, matrix of atom coordinates.
nc_data: nuclear charge data, array of atom data.
max_len: maximum amount of atoms in molecule.
@@ -144,3 +144,22 @@ def c_matrix(mol_data,
return np.sort(eig(cm)[0])[::-1]
else:
return cm
+
+
+def c_matrix_multiple(mol_data,
+ nc_data,
+ max_len=25,
+ as_eig=False,
+ bohr_radius_units=False):
+ """
+ Calculates the Coulomb Matrix of multiple molecules.
+ mol_data: molecule data, matrix of atom coordinates.
+ nc_data: nuclear charge data, array of atom data.
+ max_len: maximum amount of atoms in molecule.
+ as_eig: if data should be returned as matrix or array of eigenvalues.
+ bohr_radius_units: if units should be in bohr's radius units.
+ """
+ cm_data = np.array([c_matrix(mol, nc, max_len, as_eig, bohr_radius_units)
+ for mol, nc in zip(mol_data, nc_data)])
+
+ return cm_data