Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
epolack committed Jun 7, 2022
1 parent 4d86a66 commit 8257570
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/phonons.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ function test_supercell_q0(; N_scell=1)
Φ = Array{eltype(positions[1])}(undef, length(directions), n_atoms)
for (i, direction) in enumerate(directions)
Φ[i, :] = - ForwardDiff.derivative(0.0) do ε
n_positions = unfold(fold(positions) .+ ε .* s * direction)
new_positions = unfold(fold(positions) .+ ε .* s * direction)
forces = zeros(Vec3{complex(eltype(ε))}, length(positions))
DFTK.energy_pairwise(lattice, [:X for _ in positions],
n_positions, V, params; forces=forces, max_radius=MAX_RADIUS)
DFTK.energy_pairwise(lattice, [:X for _ in positions], new_positions, V, params;
forces=forces, max_radius=MAX_RADIUS)
[(s * f)[1] for f in forces]
end
end
Expand Down

0 comments on commit 8257570

Please sign in to comment.