Skip to content

Commit 408a568

Browse files
committed
Fixed in basis set printing when there are multiple identical atoms.
If the bug has affected you, you'd see large variance.
1 parent da0db0c commit 408a568

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crystal2qmc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -681,11 +681,13 @@ def write_basis(basis,ions,outfn):
681681
]
682682
done_atoms = set([atom_type])
683683
for sidx in range(len(shell_type)):
684+
nprim = basis['prim_shell'][sidx]
684685
new_aidx = basis['atom_shell'][sidx]-1
685686

686687
new_atom_type = ions['atom_nums'][new_aidx]
687688
if aidx != new_aidx:
688689
if new_atom_type in done_atoms:
690+
cnt+=nprim
689691
continue
690692
else:
691693
outlines += [" }","}"]
@@ -700,7 +702,6 @@ def write_basis(basis,ions,outfn):
700702
]
701703
done_atoms.add(atom_type)
702704

703-
nprim = basis['prim_shell'][sidx]
704705
outlines.append(" {0} {1}".format(shell_type[sidx],nprim))
705706
for pidx in range(nprim):
706707
outlines.append(" {0} {1} {2}".format(

0 commit comments

Comments
 (0)