diff options
author | Adrian Kummerlaender | 2021-03-28 14:43:08 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2021-03-28 14:43:08 +0200 |
commit | 8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf (patch) | |
tree | 293b747d3a051f87ab7708d4956730aec346fad4 | |
parent | 75ef8db0d058158c10951a4184186f8c6cc27acc (diff) | |
download | interacticle-8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf.tar interacticle-8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf.tar.gz interacticle-8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf.tar.bz2 interacticle-8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf.tar.lz interacticle-8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf.tar.xz interacticle-8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf.tar.zst interacticle-8c40580efd579920b3f7bdb6ef6f2c47cc82aaaf.zip |
Add examples for benzene together with argon / neon
-rw-r--r-- | examples/benzene_argon.py | 36 | ||||
-rw-r--r-- | examples/benzene_neon.py | 36 |
2 files changed, 72 insertions, 0 deletions
diff --git a/examples/benzene_argon.py b/examples/benzene_argon.py new file mode 100644 index 0000000..b5cee00 --- /dev/null +++ b/examples/benzene_argon.py @@ -0,0 +1,36 @@ +from interacticle import MoleculeCollection, LennardJones, Coulomb, Simulation + +import interacticle.visualizer +from interacticle.visual import WireBox, MolecularLinks + +from library import Benzene, Argon + +setup = MoleculeCollection() + +setup.potential(LennardJones(12.011, 0.3550, 0.070)) +setup.potential(LennardJones( 1.008, 0.2420, 0.030)) +setup.potential(LennardJones(39.948, 0.3395, 0.971)) + +setup.potential(Coulomb(12.011, -0.115)) +setup.potential(Coulomb( 1.008, 0.115)) + +for y in range(6): + for z in range(6): + setup.add(Benzene, (4.4,0.2+0.8*y,0.2+0.8*z)) + +for x in range(10): + for y in range(12): + for z in range(12): + setup.add(Argon, (0.2+0.4*x,0.2+0.4*y,0.2+0.4*z)) + +setup.domain_size = 5 +setup.tau = 0.0005 +setup.cutoff = 0.3395*2.5 +setup.target_temperature = 300 + +setup.max_coulomb = 1000 +setup.max_lennard_jones = 1000 + +simulation = Simulation(setup, opengl = True) + +interacticle.visualizer.simulate(setup, simulation, [ WireBox(setup.domain_size), MolecularLinks(simulation) ], 100) diff --git a/examples/benzene_neon.py b/examples/benzene_neon.py new file mode 100644 index 0000000..cad2af2 --- /dev/null +++ b/examples/benzene_neon.py @@ -0,0 +1,36 @@ +from interacticle import MoleculeCollection, LennardJones, Coulomb, Simulation + +import interacticle.visualizer +from interacticle.visual import WireBox, MolecularLinks + +from library import Benzene, Neon + +setup = MoleculeCollection() + +setup.potential(LennardJones(12.011, 0.3550, 0.070)) +setup.potential(LennardJones( 1.008, 0.2420, 0.030)) +setup.potential(LennardJones(20.180, 0.2801, 0.282)) + +setup.potential(Coulomb(12.011, -0.115)) +setup.potential(Coulomb( 1.008, 0.115)) + +for y in range(6): + for z in range(6): + setup.add(Benzene, (4.4,0.2+0.8*y,0.2+0.8*z)) + +for x in range(10): + for y in range(12): + for z in range(12): + setup.add(Neon, (0.2+0.4*x,0.2+0.4*y,0.2+0.4*z)) + +setup.domain_size = 5 +setup.tau = 0.0005 +setup.cutoff = 0.242*2.5 +setup.target_temperature = 300 + +setup.max_coulomb = 2000 +setup.max_lennard_jones = 2000 + +simulation = Simulation(setup, opengl = True) + +interacticle.visualizer.simulate(setup, simulation, [ WireBox(setup.domain_size), MolecularLinks(simulation) ], 100) |