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
|
from interacticle import MoleculeCollection, LennardJones, Coulomb, Simulation
import interacticle.visualizer
from interacticle.visual import WireBox, MolecularLinks, VelocityHistogram, TemperaturePlot
from library import Water
setup = MoleculeCollection()
setup.potential(LennardJones(15.9992, 0.31776, 0.792324))
setup.potential(Coulomb(15.9992, -0.8450))
setup.potential(Coulomb( 1.0079, 0.4225))
for x in range(4):
for y in range(4):
for z in range(4):
setup.add(Water, (0.2+0.7*x,0.2+0.7*y,0.2+0.7*z))
setup.domain_size = 5
setup.tau = 0.0001
setup.cutoff = 2.6
setup.max_lennard_jones = 500
setup.max_coulomb = 500
setup.statistics_step = 100
setup.neighborhood_step = 500
simulation = Simulation(setup, opengl = True)
histogram = VelocityHistogram(simulation, [1.1,0.5], [1,0.5])
interacticle.visualizer.simulate(setup, simulation, [ WireBox(setup.domain_size), MolecularLinks(simulation), histogram ], 100)
|