JuliaMolSim / Molly.jl

Molecular simulation in Julia
Other
372 stars 51 forks source link

Most of the examples has bugs with version 0.7.0 #50

Closed skycolt closed 2 years ago

skycolt commented 2 years ago

For example in the first example, place_atoms should be placeatoms. And AndersenThermostat has wrong number of variables, etc...

n_atoms = 100 box_size = SVector(2.0, 2.0, 2.0)u"nm" temp = 298.0u"K" atom_mass = 10.0u"u"

atoms = [Atom(mass=atom_mass, σ=0.3u"nm", ϵ=0.2u"kJ * mol^-1") for i in 1:n_atoms] coords = place_atoms(n_atoms, box_size, 0.3u"nm") velocities = [velocity(atom_mass, temp) for i in 1:n_atoms] general_inters = (LennardJones(),) simulator = VelocityVerlet(dt=0.002u"ps", coupling=AndersenThermostat(temp, 1.0u"ps"))

sys = System( atoms=atoms, general_inters=general_inters, coords=coords, velocities=velocities, box_size=box_size, loggers=Dict("temp" => TemperatureLogger(100)), )

simulate!(sys, simulator, 10_000)