Skip to content

Commit

Permalink
Fix flattening of atom symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
YAY-C committed Jul 4, 2024
1 parent 74f729a commit 9bb37c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qstack/spahm/rho/bond.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import argparse
import numpy as np
from itertools import chain
from qstack.tools import correct_num_threads
from . import utils, dmb_rep_bond as dmbb
from .utils import defaults
Expand Down Expand Up @@ -127,7 +128,7 @@ def get_repr(mols, xyzlist, guess, xc=defaults.xc, spin=None, readdm=None,
shape = (len(omods), -1, maxlen)
atidx = np.where(np.array([[1]*len(zin) + [0]*(natm-len(zin)) for zin in all_atoms]).flatten())
allvec = allvec.reshape(shape)[:,atidx,:].reshape(shape)
all_atoms = all_atoms.flatten()
all_atoms = list(chain.from_iterable(all_atoms))
allvec = allvec.squeeze()
elif with_symbols:
msg = f"You can not use 'split=True' and 'with_symbols=True' at the same time!"
Expand Down

0 comments on commit 9bb37c2

Please sign in to comment.