From 357917bcadafef30c2246d814800e3f0c4dd2872 Mon Sep 17 00:00:00 2001 From: Leandro Martinez Date: Tue, 8 Oct 2024 16:43:57 -0300 Subject: [PATCH] add nmols to PackmolSystem --- src/data_structures/PackmolSystem.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/data_structures/PackmolSystem.jl b/src/data_structures/PackmolSystem.jl index 8bf7060..2baa16e 100644 --- a/src/data_structures/PackmolSystem.jl +++ b/src/data_structures/PackmolSystem.jl @@ -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 @@ -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 @@ -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