Skip to content

Commit

Permalink
add nmols to PackmolSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Oct 8, 2024
1 parent d68cfd5 commit 357917b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data_structures/PackmolSystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Base.zero(::Type{MoleculePosition{N,T}}) where {N,T} = MoleculePosition(zero(SVe
optim_print_level::Int = 0
chkgrad::Bool = false
atoms::Vector{AtomData{D,T}} = AtomData{D,T}[]
nmols::Int = 0
molecule_positions::MoleculePosition{D,T} = MoleculePosition{D,T}[]
end

Expand Down Expand Up @@ -155,6 +156,7 @@ function read_packmol_input(input_file::String; D::Int=3, T::DataType=Float64)
:structure_types => StructureType{D,T}[],
:atoms => AtomData{D,T}[]
:molecule_positions => MoleculePosition{D,T}[]
:nmols => 0,
)
structure_section = false
open(input_file) do io
Expand Down Expand Up @@ -243,6 +245,7 @@ function read_packmol_input(input_file::String; D::Int=3, T::DataType=Float64)
end
end
end
input_data[:nmols] = mol_index

return PackmolSystem{D,T}(; input_data...)
end
Expand Down

0 comments on commit 357917b

Please sign in to comment.