Skip to content

Commit

Permalink
Restore missing docstring (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexsp32 authored Aug 14, 2024
1 parent ed5d2cc commit a8abfe2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/adiabatic/ase_interface.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using PythonCall

"""
AdiabaticASEModel{A} <: AdiabaticModel
Expand All @@ -13,9 +14,6 @@ Implements both `potential` and `derivative!`.
Both PyCall.jl and PythonCall.jl can be used to create the `ase.Atoms` object, but **PythonCall.jl is preferred**.
"""

using PythonCall

struct AdiabaticASEModel{A} <: AdiabaticModel
atoms::A
end
Expand All @@ -25,7 +23,7 @@ NQCModels.ndofs(::AdiabaticASEModel) = 3
function NQCModels.potential(model::AdiabaticASEModel, R::AbstractMatrix)
set_coordinates!(model, R)
V = model.atoms.get_potential_energy()
return austrip(pyconvert(eltype(R),V) * u"eV")
return austrip(pyconvert(eltype(R), V) * u"eV")
end

function NQCModels.derivative!(model::AdiabaticASEModel, D::AbstractMatrix, R::AbstractMatrix)
Expand All @@ -44,5 +42,5 @@ This module contains methods related to the NQCModels ASE interface that need ac
"""

function NQCModels.mobileatoms(model::AdiabaticASEModel, n::Int)
return symdiff(1:length(model.atoms), [pyconvert(Vector,constraint.get_indices()) .+ 1 for constraint in model.atoms.constraints]...)
return symdiff(1:length(model.atoms), [pyconvert(Vector, constraint.get_indices()) .+ 1 for constraint in model.atoms.constraints]...)
end

0 comments on commit a8abfe2

Please # to comment.