Skip to content

Commit c4f2732

Browse files
committed
Fix indexing problem
1 parent 1ef47b0 commit c4f2732

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

src/optimizebasis.jl

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -78,35 +78,33 @@ function print_gaussian94(io, element, n, l, β, γ, coeffs)
7878
end
7979
end
8080

81-
function optimizebasis(molecule, settings)
81+
function optimizebasis(molecule, bssettings)
8282
atoms = getatoms(molecule)
8383

8484
basis = GaussianBasisSet[]
8585

8686
for atom in atoms
87-
for setting in settings
88-
println("Optimizing basis for atom: ", atom.symbol)
89-
for (n, l, k) in setting[atom.symbol]
90-
println("Optimizing for n=$n, l=$l, k=$k")
91-
β, γ, ζ, alphas, coeffs, rms = optimise_basis_v2(k, n, l)
92-
print(coeffs)
93-
for momentum in _angularmomentum(l)
94-
= momentum[1]
95-
m = momentum[2]
96-
n = momentum[3]
97-
push!(basis,
98-
GaussianBasisSet(
99-
atom.coords,
100-
alphas,
101-
coeffs,
102-
normalization.(alphas, ℓ, m, n),
103-
length(alphas),
104-
ℓ,
105-
m,
106-
n
107-
)
87+
println("Optimizing basis for atom: ", atom.symbol)
88+
for (n, l, k) in bssettings[$atom.symbol]
89+
println("Optimizing for n=$n, l=$l, k=$k")
90+
β, γ, ζ, alphas, coeffs, rms = optimise_basis_v2(k, n, l)
91+
print(coeffs)
92+
for momentum in _angularmomentum(l)
93+
= momentum[1]
94+
m = momentum[2]
95+
n = momentum[3]
96+
push!(basis,
97+
GaussianBasisSet(
98+
atom.coords,
99+
alphas,
100+
coeffs,
101+
normalization.(alphas, ℓ, m, n),
102+
length(alphas),
103+
ℓ,
104+
m,
105+
n
108106
)
109-
end
107+
)
110108
end
111109
end
112110
end

0 commit comments

Comments
 (0)