diff options
author | Adrian Kummerlaender | 2021-03-27 22:35:43 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2021-03-27 22:35:43 +0100 |
commit | 75ef8db0d058158c10951a4184186f8c6cc27acc (patch) | |
tree | 03a33785b65472fc5eff9cc5d2c03379747b83d4 /examples/dimer_only.py | |
download | interacticle-75ef8db0d058158c10951a4184186f8c6cc27acc.tar interacticle-75ef8db0d058158c10951a4184186f8c6cc27acc.tar.gz interacticle-75ef8db0d058158c10951a4184186f8c6cc27acc.tar.bz2 interacticle-75ef8db0d058158c10951a4184186f8c6cc27acc.tar.lz interacticle-75ef8db0d058158c10951a4184186f8c6cc27acc.tar.xz interacticle-75ef8db0d058158c10951a4184186f8c6cc27acc.tar.zst interacticle-75ef8db0d058158c10951a4184186f8c6cc27acc.zip |
Initial public commit of this basic MD code
Simulation of interacting particles
Diffstat (limited to 'examples/dimer_only.py')
-rw-r--r-- | examples/dimer_only.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/dimer_only.py b/examples/dimer_only.py new file mode 100644 index 0000000..c58eb39 --- /dev/null +++ b/examples/dimer_only.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 + +setup = MoleculeCollection() + +setup.potential(LennardJones(12.011, 0.3550, 0.070)) +setup.potential(LennardJones( 1.008, 0.2420, 0.030)) + +setup.potential(Coulomb(12.011, -0.115)) +setup.potential(Coulomb( 1.008, 0.115)) + +# T-shaped dimer +setup.add(Benzene, (1,1,1.519), rotations=[([0,1,0], 15), ([1,0,0], -9), ([1,0,0], 90), ([0,1,0], 90)]) +setup.add(Benzene, (1,1,1.0), rotations=[([0,1,0], 15), ([1,0,0], -9), ([0,0,1], 30)]) + +# Sandwich-shaped dimer +#setup.add(Benzene, (1,1,1), rotations=[([0,1,0], 15), ([1,0,0], -9), ([1,0,0], 90), ([0,1,0], 90)]) +#setup.add(Benzene, (1,1.377,1), rotations=[([0,1,0], 15), ([1,0,0], -9), ([1,0,0], 90), ([0,1,0], 60)]) + +# Parallel displaced dimer +#setup.add(Benzene, (1,1,1), rotations=[([0,1,0], 15), ([1,0,0], -9), ([1,0,0], 90), ([0,1,0], 90)]) +#setup.add(Benzene, (1.5,1.3,1), rotations=[([0,1,0], 15), ([1,0,0], -9), ([1,0,0], 90), ([0,1,0], 90)]) + +setup.domain_size = 2 +setup.tau = 0.0005 +setup.cutoff = 0.242*2.5 +setup.statistics_step = 100 +setup.neighborhood_step = 100 + +simulation = Simulation(setup, opengl = True) + +interacticle.visualizer.simulate(setup, simulation, [ WireBox(setup.domain_size), MolecularLinks(simulation) ], 100) |