|
46 | 46 | burn = 0 |
47 | 47 | block = [0, 1, 2, 4, 8] |
48 | 48 | sampletimes = build_schedule(steps, burn, block) |
49 | | - callbacks = (callback_energy, callback_acceptance) |
50 | 49 |
|
51 | 50 | # NO SWAPS |
52 | 51 | pswap = 0.0 |
|
57 | 56 | ) |
58 | 57 | algorithm_list = ( |
59 | 58 | (algorithm=Metropolis, pool=pool, seed=seed, parallel=false, sweepstep=system_el.N), |
60 | | - (algorithm=StoreCallbacks, callbacks=(callback_energy, callback_acceptance), scheduler=sampletimes), |
| 59 | + (algorithm=StoreCallbacks, callbacks=(energy,), scheduler=sampletimes), |
| 60 | + (algorithm=StoreAcceptance, dependencies=(Metropolis,), scheduler=sampletimes), |
61 | 61 | (algorithm=StoreTrajectories, scheduler=sampletimes, fmt=EXYZ()), |
62 | 62 | (algorithm=StoreLastFrames, scheduler=[steps], fmt=LAMMPS()), |
63 | 63 | (algorithm=PrintTimeSteps, scheduler=build_schedule(steps, burn, steps ÷ 10)), |
|
81 | 81 | run!(simulation) |
82 | 82 |
|
83 | 83 | ## Read energy data and compare |
84 | | - path_energy_el = joinpath(path_el, "energy.dat") |
85 | | - path_energy_ll = joinpath(path_ll, "energy.dat") |
86 | | - path_energy_vl = joinpath(path_vl, "energy.dat") |
| 84 | + path_energy_el = joinpath(path_el, "chains/1/energy.dat") |
| 85 | + path_energy_ll = joinpath(path_ll, "chains/1/energy.dat") |
| 86 | + path_energy_vl = joinpath(path_vl, "chains/1/energy.dat") |
87 | 87 | energy_el= readdlm(path_energy_el)[:, 2] |
88 | 88 | energy_ll = readdlm(path_energy_ll)[:, 2] |
89 | 89 | energy_vl = readdlm(path_energy_vl)[:, 2] |
|
103 | 103 | ) |
104 | 104 | algorithm_list = ( |
105 | 105 | (algorithm=Metropolis, pool=pool, seed=seed, parallel=false, sweepstep=system_el.N), |
106 | | - (algorithm=StoreCallbacks, callbacks=(callback_energy, callback_acceptance), scheduler=sampletimes, fmt=XYZ()), |
| 106 | + (algorithm=StoreCallbacks, callbacks=(energy,), scheduler=sampletimes), |
| 107 | + (algorithm=StoreAcceptance, dependencies=(Metropolis,), scheduler=sampletimes), |
107 | 108 | (algorithm=StoreTrajectories, scheduler=sampletimes, fmt=XYZ()), |
108 | 109 | (algorithm=StoreLastFrames, scheduler=[steps], fmt=XYZ()), |
109 | 110 | (algorithm=PrintTimeSteps, scheduler=build_schedule(steps, burn, steps ÷ 10), fmt=XYZ()), |
|
121 | 122 | run!(simulation) |
122 | 123 |
|
123 | 124 | ## Read energy data and compare |
124 | | - path_energy_el = joinpath(path_el, "energy.dat") |
125 | | - path_energy_ll = joinpath(path_ll, "energy.dat") |
| 125 | + path_energy_el = joinpath(path_el, "chains/1/energy.dat") |
| 126 | + path_energy_ll = joinpath(path_ll, "chains/1/energy.dat") |
126 | 127 | energy_el= readdlm(path_energy_el)[:, 2] |
127 | 128 | energy_ll = readdlm(path_energy_ll)[:, 2] |
128 | 129 | @test isapprox(energy_el, energy_ll, atol=1e-6) |
|
154 | 155 | burn = 0 |
155 | 156 | block = [0, 1, 2, 4, 8] |
156 | 157 | sampletimes = build_schedule(steps, burn, block) |
157 | | - callbacks = (callback_energy, callback_acceptance) |
158 | 158 |
|
159 | 159 | # NO SWAPS |
160 | 160 | pswap = 0.0 |
|
165 | 165 | ) |
166 | 166 | algorithm_list = ( |
167 | 167 | (algorithm=Metropolis, pool=pool, seed=seed, parallel=false, sweepstep=system_el.N), |
168 | | - (algorithm=StoreCallbacks, callbacks=(callback_energy, callback_acceptance), scheduler=sampletimes), |
| 168 | + (algorithm=StoreCallbacks, callbacks=(energy,), scheduler=sampletimes), |
| 169 | + (algorithm=StoreAcceptance, dependencies=(Metropolis,), scheduler=sampletimes), |
169 | 170 | (algorithm=StoreTrajectories, scheduler=sampletimes, fmt=EXYZ()), |
170 | 171 | (algorithm=StoreLastFrames, scheduler=[steps], fmt=EXYZ()), |
171 | 172 | (algorithm=PrintTimeSteps, scheduler=build_schedule(steps, burn, steps ÷ 10)), |
|
183 | 184 | run!(simulation) |
184 | 185 |
|
185 | 186 | ## Read energy data and compare |
186 | | - path_energy_el = joinpath(path_el, "energy.dat") |
187 | | - path_energy_ll = joinpath(path_ll, "energy.dat") |
| 187 | + path_energy_el = joinpath(path_el, "chains/1/energy.dat") |
| 188 | + path_energy_ll = joinpath(path_ll, "chains/1/energy.dat") |
188 | 189 | energy_el= readdlm(path_energy_el)[:, 2] |
189 | 190 | energy_ll = readdlm(path_energy_ll)[:, 2] |
190 | 191 | @test isapprox(energy_el, energy_ll, atol=1e-6) |
|
0 commit comments