summaryrefslogtreecommitdiff
path: root/examples/benzene_neon.py
blob: cad2af25c81636bcd3af77494aa6ea7d4a2e53e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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)