-
-
Save daviddesancho/125b446d79b75b8d346f564e967ebaa1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modeller import * | |
from modeller.scripts import complete_pdb | |
log.none() | |
env = environ() | |
env.io.atom_files_directory = '../atom_files' | |
env.libs.topology.read(file='$(LIB)/top_heav.lib') | |
env.libs.parameters.read(file='$(LIB)/par.lib') | |
mdl = complete_pdb(env, "PDB/pdb2a3d.ent") | |
def make_restranints(sel): | |
mdl.restraints.make(sel, restraint_type='LJ', spline_on_site=False) | |
mdl.restraints.make(sel, restraint_type='LJ14', spline_on_site=False) | |
mdl.restraints.make(sel, restraint_type='COULOMB14', spline_on_site=False) | |
return sel | |
s0 = selection(mdl.residue_range('%s:A'%str(2),'%s:A'%str(20))) | |
s1 = selection(mdl.residue_range('%s:A'%str(24),'%s:A'%str(43))) | |
s0s1 = s0 | s1 | |
for sel in [s0, s1, s0s1]: | |
sel = make_restranints(sel) | |
(molpdf, terms) = sel.energy(edat=energy_data(dynamic_sphere=True)) | |
print terms | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment