summaryrefslogtreecommitdiff
path: root/examples/dimer_only.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dimer_only.py')
-rw-r--r--examples/dimer_only.py36
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)