def get_sas(pdb, probe): import modeller # Read the PDB file env = modeller.environ() mdl = modeller.model(env) mdl.read(file=pdb) # Calculate atomic accessibilities (in Biso) with appropriate probe_radius myedat = modeller.energy_data() myedat.radii_factor = 1.6 mdl.write_data(edat=myedat, output="PSA ATOMIC_SOL", psa_integration_step=0.05, probe_radius=probe) mdl.write(file=pdb.rsplit(".", 1)[0] + ".sas") # read SAS with open("%s.sas" % (pdb.rsplit(".", 1)[0],)) as data: D = data.readlines() Sas = {} for d in D: d = d.strip() if d[:4] == "ATOM": atom, res, resid, cid = d[12:16], d[17:20], int(d[22:26]), d[21] if cid == " ": cid = "A" Sas[(atom, res, resid, cid)] = float(d[60:66]) return Sas
def get_sas(pdb,probe): import modeller # Read the PDB file env = modeller.environ() mdl = modeller.model(env) mdl.read(file=pdb) # Calculate atomic accessibilities (in Biso) with appropriate probe_radius myedat = modeller.energy_data() myedat.radii_factor = 1.6 mdl.write_data(edat=myedat, output='PSA ATOMIC_SOL', psa_integration_step=0.05, probe_radius=probe) mdl.write(file=pdb.rsplit('.',1)[0]+'.sas') # read SAS with open('%s.sas' % (pdb.rsplit('.',1)[0], )) as data: D = data.readlines() Sas = {} for d in D: d = d.strip() if d[:4]=='ATOM': atom, res, resid, cid = d[12:16], d[17:20], int(d[22:26]), d[21] if cid == ' ': cid='A' Sas[(atom,res,resid,cid)] = float(d[60:66]) return Sas
def get_dope_energy_data(self): """Get ideal energy_data terms for DOPE potential evaluations""" return energy_data(contact_shell=15.0, dynamic_modeller=True, dynamic_lennard=False, dynamic_sphere=False, excl_local=(False, False, False, False))
def _get_energy_data(self): from modeller import energy_data return energy_data(contact_shell=-999, dynamic_sphere=False, excl_local=[True, False, False, True])
def _get_energy_data(self): from modeller import energy_data return energy_data(contact_shell=-999, dynamic_sphere=False)