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

Tests missing #11

Open
erjank opened this issue Jan 13, 2023 · 5 comments
Open

Tests missing #11

erjank opened this issue Jan 13, 2023 · 5 comments
Assignees

Comments

@erjank
Copy link
Contributor

erjank commented Jan 13, 2023

What properties should our simulation have, and how can we test that we're passing these minimal sanity checks as we develop?

@erjank
Copy link
Contributor Author

erjank commented Jan 27, 2023

Maybe one test is that a regular MC simulation of the densest disk packing should have an acceptance ratio of 0? Or for two LJ particles the average PE should be close to -1.0?

@marjanalbooyeh
Copy link
Contributor

Running the test for a system with 2 LJ particles using below parameters:

sim = Simulation(n_particles=2, n_density=0.1, 
                 energy_func=lj_energy, 
                 trajectory_write_freq=10, energy_write_freq=10, hard_sphere=False)
sim.run(500000, kT=2.0, max_trans=0.01)

Results:

  • sim.acceptance_ratio: 0.002848
  • Average energy: -0.99993

image

@erjank
Copy link
Contributor Author

erjank commented Jan 31, 2023 via email

@marjanalbooyeh
Copy link
Contributor

Results from running the simulation for 3 LJ particles:

sim = Simulation(n_particles=3, n_density=0.1, 
                 energy_func=lj_energy, 
                 trajectory_write_freq=10000, energy_write_freq=10000, hard_sphere=False)
sim.run(50000000, kT=1.0, max_trans=0.05)

Results:

  • sim.acceptance_ratio : 0.1811
  • Average energy: 24310669.286873266
  • decorrelation steps: 1
    image

Since it seems like the system is not converging yet (high average energy and decorrelation steps is 1), I took a look at the histogram of the energy and it's seems like energy is concentrated around -3.

Screen Shot 2023-01-31 at 11 13 54 AM

Does that make sense @erjank?

@erjank
Copy link
Contributor Author

erjank commented Jan 31, 2023 via email

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

5 participants