Skip to content

Commit 29e6f32

Browse files
removed unnecessary functions
1 parent 5bcf582 commit 29e6f32

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

src/nbody_to_ode.jl

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ function gather_bodies_initial_coordinates(simulation::NBodySimulation{<:WaterSP
3333
(u0, v0, n)
3434
end
3535

36-
37-
3836
function 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)
7472
end
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-
10374
function 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

Comments
 (0)