@@ -33,8 +33,6 @@ function gather_bodies_initial_coordinates(simulation::NBodySimulation{<:WaterSP
3333 (u0, v0, n)
3434end
3535
36-
37-
3836function gather_atom_coordinates (system:: WaterSPCFw{<:MassBody} , len)
3937 molecules = system. bodies;
4038 n = length (molecules)
@@ -73,33 +71,6 @@ function gather_atom_coordinates(system::WaterSPCFw{<:WaterMolecule}, len)
7371 (u0, v0)
7472end
7573
76- function gather_bodies_initial_coordinates_in_vectors (simulation:: NBodySimulation{<:WaterSPCFw} )
77- system = simulation. system
78- molecules = system. bodies;
79- n = length (molecules)
80- len = 3 * n
81-
82- if simulation. thermostat isa NoseHooverThermostat
83- len = 3 * n+ 1
84- end
85-
86- u0 = zeros (3 * len)
87- v0 = zeros (3 * len)
88-
89- for i = 1 : n
90- p = system. scpfw_parameters
91- indO, indH1, indH2 = 9 * (i - 1 ) + 1 , 9 * (i - 1 ) + 4 , 9 * (i - 1 ) + 7
92- u0[indO: indO+ 2 ] = molecules[i]. r
93- u0[indH1: indH1+ 2 ] = molecules[i]. r .+ [p. rOH, 0.0 , 0.0 ]
94- u0[indH2: indH2+ 2 ] = molecules[i]. r .+ [cos (p. aHOH) * p. rOH, 0.0 , sin (p. aHOH) * p. rOH]
95- v0[indO: indO+ 2 ] = molecules[i]. v
96- v0[indH1: indH1+ 2 ] = molecules[i]. v
97- v0[indH2: indH2+ 2 ] = molecules[i]. v
98- end
99-
100- (u0, v0, n)
101- end
102-
10374function gather_accelerations_for_potentials (simulation:: NBodySimulation{CustomAccelerationSystem} )
10475 acceleration_functions = []
10576 push! (acceleration_functions, simulation. system. acceleration)
@@ -483,9 +454,7 @@ function DiffEqBase.SDEProblem(simulation::NBodySimulation{<:WaterSPCFw})
483454 end
484455 @. du[:, 3 * n+ 1 : 2 * 3 * n] -= therm. γ* u[:, 3 * n+ 1 : 2 * 3 * n]
485456 end
486-
487- # σO = sqrt(2*therm.γ*simulation.kb*therm.T/simulation.system.mO)
488- # σH = sqrt(2*therm.γ*simulation.kb*therm.T/simulation.system.mH)
457+
489458 σO = sqrt (2 * therm. γ* simulation. kb* therm. T)/ mO
490459 σH = sqrt (2 * therm. γ* simulation. kb* therm. T)/ mH
491460
0 commit comments