In [6]:
# Example for: selection.energy()

# This will calculate the stereochemical energy (bonds,
# angles, dihedrals, impropers) for a given model.

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, "pdb2a3d.ent")

In [3]:
# Select all atoms
atmsel = selection(mdl)
#amtsel = make_restranints(atmsel)
(molpdf, terms) = atmsel.energy(edat=energy_data(dynamic_sphere=True))
print terms


physical.values(bond=0.000000, angle=0.000000, dihedral=0.000000, improper=0.000000, soft_sphere=30.308956, lennard_jones=0.000000, coulomb=0.000000, h_bond=0.000000, ca_distance=0.000000, n_o_distance=0.000000, phi_dihedral=0.000000, psi_dihedral=0.000000, omega_dihedral=0.000000, chi1_dihedral=0.000000, chi2_dihedral=0.000000, chi3_dihedral=0.000000, chi4_dihedral=0.000000, disulfide_distance=0.000000, disulfide_angle=0.000000, disulfide_dihedral=0.000000, lower_distance=0.000000, upper_distance=0.000000, sd_mn_distance=0.000000, chi5_dihedral=0.000000, phi_psi_dihedral=0.000000, sd_sd_distance=0.000000, xy_distance=0.000000, nmr_distance=0.000000, nmr_distance2=0.000000, min_distance=0.000000, nonbond_spline=0.000000, accessibility=0.000000, density=0.000000, absposition=0.000000, dihedral_diff=0.000000, gbsa=0.000000, em_density=0.000000, saxs=0.000000, symmetry=0.000000)

In [4]:
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

In [5]:
for sel in [s0, s1, s0s1]:
    #sel = make_restranints(sel)
    (molpdf, terms) = sel.energy(edat=energy_data(dynamic_sphere=True, dynamic_lennard=True, dynamic_coulomb=True))
    print terms
    print


physical.values(bond=0.000000, angle=0.000000, dihedral=0.000000, improper=0.000000, soft_sphere=1.282960, lennard_jones=61.895496, coulomb=-504.588409, h_bond=0.000000, ca_distance=0.000000, n_o_distance=0.000000, phi_dihedral=0.000000, psi_dihedral=0.000000, omega_dihedral=0.000000, chi1_dihedral=0.000000, chi2_dihedral=0.000000, chi3_dihedral=0.000000, chi4_dihedral=0.000000, disulfide_distance=0.000000, disulfide_angle=0.000000, disulfide_dihedral=0.000000, lower_distance=0.000000, upper_distance=0.000000, sd_mn_distance=0.000000, chi5_dihedral=0.000000, phi_psi_dihedral=0.000000, sd_sd_distance=0.000000, xy_distance=0.000000, nmr_distance=0.000000, nmr_distance2=0.000000, min_distance=0.000000, nonbond_spline=0.000000, accessibility=0.000000, density=0.000000, absposition=0.000000, dihedral_diff=0.000000, gbsa=0.000000, em_density=0.000000, saxs=0.000000, symmetry=0.000000)

physical.values(bond=0.000000, angle=0.000000, dihedral=0.000000, improper=0.000000, soft_sphere=19.204775, lennard_jones=147.117310, coulomb=-779.387878, h_bond=0.000000, ca_distance=0.000000, n_o_distance=0.000000, phi_dihedral=0.000000, psi_dihedral=0.000000, omega_dihedral=0.000000, chi1_dihedral=0.000000, chi2_dihedral=0.000000, chi3_dihedral=0.000000, chi4_dihedral=0.000000, disulfide_distance=0.000000, disulfide_angle=0.000000, disulfide_dihedral=0.000000, lower_distance=0.000000, upper_distance=0.000000, sd_mn_distance=0.000000, chi5_dihedral=0.000000, phi_psi_dihedral=0.000000, sd_sd_distance=0.000000, xy_distance=0.000000, nmr_distance=0.000000, nmr_distance2=0.000000, min_distance=0.000000, nonbond_spline=0.000000, accessibility=0.000000, density=0.000000, absposition=0.000000, dihedral_diff=0.000000, gbsa=0.000000, em_density=0.000000, saxs=0.000000, symmetry=0.000000)

physical.values(bond=0.000000, angle=0.000000, dihedral=0.000000, improper=0.000000, soft_sphere=20.349026, lennard_jones=201.242874, coulomb=-1239.575684, h_bond=0.000000, ca_distance=0.000000, n_o_distance=0.000000, phi_dihedral=0.000000, psi_dihedral=0.000000, omega_dihedral=0.000000, chi1_dihedral=0.000000, chi2_dihedral=0.000000, chi3_dihedral=0.000000, chi4_dihedral=0.000000, disulfide_distance=0.000000, disulfide_angle=0.000000, disulfide_dihedral=0.000000, lower_distance=0.000000, upper_distance=0.000000, sd_mn_distance=0.000000, chi5_dihedral=0.000000, phi_psi_dihedral=0.000000, sd_sd_distance=0.000000, xy_distance=0.000000, nmr_distance=0.000000, nmr_distance2=0.000000, min_distance=0.000000, nonbond_spline=0.000000, accessibility=0.000000, density=0.000000, absposition=0.000000, dihedral_diff=0.000000, gbsa=0.000000, em_density=0.000000, saxs=0.000000, symmetry=0.000000)


In [ ]:
interface_energy = s0s1.energy()[0] - (s0.energy()[0] + s1.energy()[0])
print interface_energy