|
124 | 124 | function obtain_data_for_harmonic_bond_interaction(system::WaterSPCFw, p::SPCFwParameters) |
125 | 125 | neighbouhoods = Dict{Int, Vector{Tuple{Int,Float64}}}() |
126 | 126 | n = length(system.bodies) |
127 | | - ms = zeros(typeof(first(system.bodies).m), 3 * n) |
| 127 | + ms = zeros(3 * n) |
128 | 128 | for i in 1:n |
129 | 129 | indO, indH1, indH2 = 3 * (i - 1) + 1, 3 * (i - 1) + 2, 3 * (i - 1) + 3 |
130 | 130 | ms[indO] = system.mO |
|
162 | 162 | function obtain_data_for_lennard_jones_interaction(system::WaterSPCFw) |
163 | 163 | bodies = system.bodies |
164 | 164 | n = length(bodies) |
165 | | - ms = zeros(typeof(first(bodies).m), 3 * n) |
| 165 | + ms = zeros(3 * n) |
166 | 166 | indxs = zeros(Int, n) |
167 | 167 | for i = 1:n |
168 | 168 | indxs[i] = 3 * (i - 1) + 1 |
|
191 | 191 | function obtain_data_for_electrostatic_interaction(system::WaterSPCFw) |
192 | 192 | bodies = system.bodies |
193 | 193 | n = length(bodies) |
194 | | - qs = zeros(typeof(first(bodies).m), 3 * n) |
195 | | - ms = zeros(typeof(first(bodies).m), 3 * n) |
| 194 | + qs = zeros(3 * n) |
| 195 | + ms = zeros(3 * n) |
196 | 196 | indxs = collect(1:3*n) |
197 | 197 | exclude = Dict{Int, Vector{Int}}() |
198 | 198 | for i = 1:n |
@@ -222,7 +222,7 @@ function obtain_data_for_valence_angle_harmonic_interaction(system::WaterSPCFw) |
222 | 222 | p = system.scpfw_parameters |
223 | 223 | bonds = Vector{Tuple{Int, Int, Int, Float64, Float64}}() |
224 | 224 | n = length(system.bodies) |
225 | | - ms = zeros(typeof(first(bodies).m), 3 * n) |
| 225 | + ms = zeros(3 * n) |
226 | 226 | for i = 1:n |
227 | 227 | indO, indH1, indH2 = 3 * (i - 1) + 1, 3 * (i - 1) + 2, 3 * (i - 1) + 3 |
228 | 228 | ms[indO] = system.mO |
|
0 commit comments