42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
class Atom:
|
|
|
|
def __init__(self, ATOM_ID, ATOM_NAME, ALT_LOCAT, RES_NAME, CHAIN_ID,
|
|
RES_SEQ_NB, RES_INSER_CODE, COORD_X, COORD_Y, COORD_Z,
|
|
OCCUPANCY, TEMP_FACT, ELEM_SYMBOL, ATOM_CHARGE):
|
|
|
|
self.ATOM_ID = ATOM_ID
|
|
self.ATOM_NAME = ATOM_NAME
|
|
self.ALT_LOCAT = ALT_LOCAT
|
|
self.RES_NAME = RES_NAME
|
|
self.CHAIN_ID = CHAIN_ID
|
|
self.RES_SEQ_NB = RES_SEQ_NB
|
|
self.RES_INSER_CODE = RES_INSER_CODE
|
|
self.COORD_X = COORD_X
|
|
self.COORD_Y = COORD_Y
|
|
self.COORD_Z = COORD_Z
|
|
self.OCCUPANCY = OCCUPANCY
|
|
self.TEMP_FACT = TEMP_FACT
|
|
self.ELEM_SYMBOL = ELEM_SYMBOL
|
|
self.ATOM_CHARGE = ATOM_CHARGE
|
|
|
|
class Residue:
|
|
def __init__(self, atomsList):
|
|
self.ATOMS = {}
|
|
for atom in atomsList:
|
|
self.ATOMS[atom.ATOM_NAME] = atom
|
|
if atom.ATOM_NAME == "N":
|
|
self.N = atom
|
|
if atom.ATOM_NAME == "CA":
|
|
self.CA = atom
|
|
if atom.ATOM_NAME == "C":
|
|
self.C = atom
|
|
if atom.ATOM_NAME == "O":
|
|
self.O = atom
|
|
if atom.ATOM_NAME == "CB":
|
|
self.CB = atom
|
|
if atom.ATOM_NAME == "CG1":
|
|
self.CG1 = atom
|
|
if atom.ATOM_NAME == "CG2":
|
|
self.CG2 = atom
|
|
|