-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBeH2-4+.py
44 lines (34 loc) · 1.46 KB
/
BeH2-4+.py
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
37
38
39
40
41
42
43
44
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 21 11:36:48 2013
@author: joseph
"""
from classicalChargedParticles import *
bondLength = 2.5204
berllyium = ChargedParticle(charge = 3, mass = 16420,
initialPosition = (0.0, 0.0),
initialMomentum = (0.0, 0.0),
stationary = True)
proton1 = ChargedParticle(charge = 1, mass = 1836,
initialPosition = (bondLength, 0.0),
initialMomentum = (0.0, 0.0),
stationary = False)
proton2 = ChargedParticle(charge = 1, mass = 1836,
initialPosition = (-bondLength, 0.0),
initialMomentum = (0.0, 0.0),
stationary = False)
electron1 = ChargedParticle(charge = -1, mass = 1,
initialPosition = (-bondLength, bondLength),
initialMomentum = (1.2, 0.0),
radiates = True)
hydrogen2Plus = chargedParticleUniverse([berllyium, proton1, proton2, electron1], timeStep = .05)
hydrogen2Plus.evolveNTimeSteps(730)
hydrogen2Plus.plotHistory()
#hydrogen2Plus.animateHistory(400, "hydrogen2Plus.mp4")
#plt.figure()
#plt.plot(hydrogen.totalEnergyHistory)
#plt.title("Energy")
#
#plt.figure()
#plt.plot(hydrogen.totalAngularMomentumHistory)
#plt.title("Angular Momentum")