forked from rytheranderson/cif2lammps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforce_field_construction.py
executable file
·68 lines (51 loc) · 1.5 KB
/
force_field_construction.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from __future__ import print_function
from abc import abstractmethod
#import UFF4MOF_constants
import atomic_data
metals = atomic_data.metals
mass_key = atomic_data.mass_key
class force_field(object):
"""
Abstract class for a force field, each force field will have an atom typing method,
methods for finding all defined bonds, angles, dihedrals, and impropers, and methods
for parametrizing all these defined interactions. The natural "base" object is a molecular
graph of the system. The networkx graph is particularly convenient for this as all the
needed information for each atom can be stored as node data.
"""
def __init__(self, system, cutoff, args):
self.system = system
self.cutoff = cutoff
self.args = args
@abstractmethod
def type_atoms(self):
pass
@abstractmethod
def bond_parameters(self):
pass
@abstractmethod
def angle_parameters(self):
pass
@abstractmethod
def dihedral_parameters(self):
pass
@abstractmethod
def improper_parameters(self):
pass
@abstractmethod
def pair_parameters(self):
pass
@abstractmethod
def enumerate_bonds(self):
pass
@abstractmethod
def enumerate_angles(self):
pass
@abstractmethod
def enumerate_dihedrals(self):
pass
@abstractmethod
def enumerate_impropers(self):
pass
@abstractmethod
def compile_force_field(self):
pass