2828 @test v_expected ≈ v_actual atol = ε
2929
3030 io = IOBuffer ()
31-
32- @test sprint (io -> show (io, system)) ==
31+
32+ @test sprint (io -> show (io, system)) ==
3333 " Potentials: \n Lennard-Jones:\n\t ϵ:1.0\n\t σ:1.0\n\t R:Inf\n "
3434
35- @test sprint (io -> show (io, simulation)) ==
35+ @test sprint (io -> show (io, simulation)) ==
3636 " Timespan: (0.0, 1.0)\n Boundary conditions: InfiniteBox{Float64}([-Inf, Inf, -Inf, Inf, -Inf, Inf])\n Potentials: \n Lennard-Jones:\n\t ϵ:1.0\n\t σ:1.0\n\t R:Inf\n "
3737
38- @test sprint (io -> show (io, sim_result)) ==
39- " N: 2\n Timespan: (0.0, 1.0)\n Boundary conditions: InfiniteBox{Float64}([-Inf, Inf, -Inf, Inf, -Inf, Inf])\n Potentials: \n Lennard-Jones:\n\t ϵ:1.0\n\t σ:1.0\n\t R:Inf\n Time steps: 1001 \n t: 0.0, 1.0\n "
38+ @test sprint (io -> show (io, sim_result)) ==
39+ " N: 2\n Timespan: (0.0, 1.0)\n Boundary conditions: InfiniteBox{Float64}([-Inf, Inf, -Inf, Inf, -Inf, Inf])\n Potentials: \n Lennard-Jones:\n\t ϵ:1.0\n\t σ:1.0\n\t R:Inf\n Time steps: 1000 \n t: 0.0, 1.0\n "
4040 end
4141
42- @testset " Three particles of liquid argon and their \" temperature\" " begin
42+ @testset " Three particles of liquid argon and their \" temperature\" " begin
4343 T = 120.0 # °K
4444 kb = 8.3144598e-3 # kJ/(K*mol)
4545 ϵ = T * kb
4848 m = 39.95 # Da
4949 L = 5 σ # 10.229σ
5050 N = 3 # floor(Int, ρ * L^3 / m)
51- R = 2.25 σ
51+ R = 2.25 σ
5252 v_dev = sqrt (3 * kb * T / m)
5353 r1 = SVector (L / 3 , L / 3 , 2 * L / 3 )
5454 r2 = SVector (L / 3 , 2 * L / 3 , L / 3 )
6969 simulation = NBodySimulation (lj_system, (t1, t2), PeriodicBoundaryConditions (L), kb);
7070 result = run_simulation (simulation, VelocityVerlet (), dt= τ)
7171
72- T1 = temperature (result, t1)
72+ T1 = temperature (result, t1)
7373 ε = 1e-6
7474 @test T1 ≈ 120.0 atol = ε
7575
110110
111111 end
112112
113- @testset " Testing RDF and MSD calculation" begin
113+ @testset " Testing RDF and MSD calculation" begin
114114 T = 120.0 # °K
115115 kb = 8.3144598e-3 # kJ/(K*mol)
116116 ϵ = T * kb
119119 m = 39.95 # Da
120120 L = 5 σ # 10.229σ
121121 N = 125 # floor(Int, ρ * L^3 / m)
122- R = 0.5 L
122+ R = 0.5 L
123123 τ = 0.5e-3 # ps or 1e-12 s
124124 t1 = 0.0
125125 t2 = 400 τ
146146 @test 2.5 == default_potential. R
147147 @test 1.0 == default_potential. σ2
148148 @test 6.25 == default_potential. R2
149-
149+
150150 io = IOBuffer ()
151151 potential1 = LennardJonesParameters ()
152152 potential2 = LennardJonesParameters (2 , 5 , 10 )
166166 @test boundary[i] == pbc[i]
167167 end
168168 end
169- end
169+ end
0 commit comments