Source code for elasnetmt.model.elastic_network_model
import molsysmt as msm
from elasnetmt import pyunitwizard as puw
import numpy as np
from matplotlib import pyplot as plt
[docs]
class ElasticNetworkModel():
def __init__(self, molecular_system, selection='atom_name=="CA"', structure_index=0, cutoff='12 angstroms',
syntax='MolSysMT'):
self.molecular_system = msm.convert(molecular_system, to_form="molsysmt.MolSys",
structure_indices=structure_index)
self.atom_indices = msm.select(self.molecular_system, selection=selection,
syntax=syntax)
self.b_factors_exp = msm.get(self.molecular_system, element='atom', selection=self.atom_indices, b_factor=True)
self.cutoff = puw.standardize(cutoff)
self.contacts = None
self.n_nodes = 0
# Start getting the contact map
self.calculate_contacts()