-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAtom.cs
62 lines (52 loc) · 1.88 KB
/
Atom.cs
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
** File: Atom.cs
** Started:
** Contributors: Joanna Slusky, Meghan Franklin, Ryan Feehan
** Overview:
**
** About:
**
** Last Edited:
*/
using System;
using System.Collections.Generic;
using System.Windows.Media.Media3D;
namespace betaBarrelProgram
{
public class Atom
{
public string AtomType { get; set; }
public string AtomName { get; set; }
public Vector3D Coords { get; set; }
public int AtomNum { get; set; }
public int ResSeqID { get; set; }
public Vector3D Hydrogen { get; set; }
public Vector3D e1 { get; set; }
public Vector3D e2 { get; set; }
public double partialcharge { get; set; }
public List<Atom> SCSCNeighAtoms { get; set; }
public List<Atom> SCBBNeighAtoms { get; set; }
public List<Atom> BBNeighAtoms { get; set; }
public Atom(string resName, Vector3D coords, int atomNum, string atomName, string atomType)
{
this.AtomNum = atomNum;
this.Coords = coords;
this.AtomName = atomName;
this.AtomType = atomType;
Tuple<string, string> key = new Tuple<string, string>(resName, atomName);
if (Global.partialChargesDict.ContainsKey(key) == true) this.partialcharge = Global.partialChargesDict[key];
else if (atomName == "H") this.partialcharge = 0.31;
else if (atomName == "N") this.partialcharge = -0.47;
else if (atomName == "C") this.partialcharge = 0.51;
else if (atomName == "O") this.partialcharge = -0.51;
else this.partialcharge = 0;
this.SCSCNeighAtoms = new List<Atom>();
this.SCBBNeighAtoms = new List<Atom>();
this.BBNeighAtoms = new List<Atom>();
}
public void translate(Vector3D translationVec)
{
this.Coords += translationVec;
}
}
}