Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example in Documentation Broken #196

Closed
cdelv opened this issue Feb 18, 2025 · 2 comments
Closed

Example in Documentation Broken #196

cdelv opened this issue Feb 18, 2025 · 2 comments

Comments

@cdelv
Copy link

cdelv commented Feb 18, 2025

Hi,

I just installed Molly using the Julia package manager. I'm using Julia 1.11.3. I tried the example on the doc page:

using Molly

n_atoms = 100
box_size = 2.0u"nm"
temp = 298u"K"
mass = 10.0u"u"

atoms = [Atom(mass=mass, σ=0.3u"nm", ϵ=0.2u"kJ * mol^-1") for i in 1:n_atoms]
coords = placeatoms(n_atoms, box_size, 0.3u"nm")
velocities = [velocity(mass, temp) for i in 1:n_atoms]
general_inters = (LennardJones(),)

s = Simulation(
    simulator=VelocityVerlet(),
    atoms=atoms,
    general_inters=general_inters,
    coords=coords,
    velocities=velocities,
    temperature=temp,
    box_size=box_size,
    thermostat=AndersenThermostat(1.0u"ps"),
    loggers=Dict("temp" => TemperatureLogger(100)),
    timestep=0.002u"ps",
    n_steps=10_000,
)

simulate!(s)

But it does not work. It fails with:

ERROR: LoadError: UndefVarError: `placeatoms` not defined in `Main`
Stacktrace:
 [1] top-level scope
   @ ~/Documents/Molly_test.jl:9
in expression starting at /home/wind/Documents/Molly_test.jl:9
@jgreener64
Copy link
Collaborator

I think you might be looking at docs for an old version? The current docs are at https://juliamolsim.github.io/Molly.jl/stable.

@cdelv
Copy link
Author

cdelv commented Feb 19, 2025

You are right. I don't know how I ended up in an old version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants