This example illustrate modeling of the GDP-AlFx dimer of human guanylate binding protein 1 (hGBP1) by rigid bodies (RBs) in PMI. Note, this example serves illustration and not scientific purposes.
"""
Guanylate binding proteins: Combining restraints
========================================
This example illustrate modeling of the GDP-AlFx dimer
of human guanylate binding protein 1 (hGBP1) by rigid
bodies (RBs) in PMI. Note, this example serves illustration
and not scientific purposes.
"""
import pathlib
import IMP
import IMP.bayesianem.restraint
import sys
try:
import scipy
except ImportError:
print("To run this example, please first install the 'scipy'")
print("Python module.")
sys.exit(0)
"Guanylate binding proteins: Combining restraints")
print("This example is too slow to test in debug mode - run without")
print("internal tests enabled")
sys.exit(0)
if sys.maxsize <= 2**32:
print("This example uses too much memory to run well on a 32-bit system")
sys.exit(0)
output_objects = list()
output_dir = root_dir / 'modeling/'
topol_fn = str(root_dir / 'mGBP2_FP_dimer.top.dat')
topol_fn,
pdb_dir=root_dir,
fasta_dir=root_dir
)
bs.add_state(reader)
hier, dof = bs.execute_macro()
state = hier.get_children()[0]
mol = state.get_children()[0]
rb = mol.get_children()[2]
crs = []
moldict = bs.get_molecules()[0]
mols = []
for molname in moldict:
for mol in moldict[molname]:
cr.add_to_model()
output_objects.append(cr)
crs.append(cr)
mols.append(mol)
ev_weight = 1.0
evr.add_to_model()
evr.set_weight(ev_weight)
output_objects.append(evr)
use_saxs_density = False
if use_saxs_density:
saxs_file = str(root_dir / "saxs" / "hGBP1_dimer+GDPAlFx_dimer.dat")
molecules = list(bs.get_molecules()[0].values())
molecules, saxs_file, weight=1.0, ff_type=IMP.saxs.RESIDUES)
saxs_restraint.add_to_model()
output_objects.append(saxs_restraint)
else:
hierarchy=hier, molecule="mGBP2_eGFP",
residue_indexes=range(261, 839),
representation_type=IMP.atom.DENSITIES
)
hierarchy=hier,
molecule="mGBP2_mCh",
residue_indexes=range(250, 827),
representation_type=IMP.atom.DENSITIES
)
target_gmm_file = str(root_dir / "saxs" / "SASDEG8.gmm.txt")
densities = sel.get_selected_particles()
densities,
target_fn=target_gmm_file,
scale_target_to_mass=True,
slope=0.01,
target_radii_scale=3.0,
target_is_rigid_body=True
)
gem.set_label("GaussianSAXS")
output_objects.append(gem)
fps_json_fn = str(root_dir / "mGBP2_FP.fps.json")
score_set = "577_577"
fret_restraint = IMP.bff.restraints.AVNetworkRestraintWrapper(
hier, fps_json_fn,
mean_position_restraint=True,
occupy_volume=False,
score_set=score_set
)
fret_restraint.add_to_model()
output_objects.append(fret_restraint)
num_frames = 100000
num_frames = 10
mdl,
simulated_annealing=False,
root_hier=hier,
monte_carlo_sample_objects=dof.get_movers(),
output_objects=output_objects,
monte_carlo_steps=10,
global_output_directory='./out/',
rmf_output_objects=None,
monte_carlo_temperature=1.0,
number_of_best_scoring_models=0,
number_of_frames=num_frames
)
rex.execute_macro()
Class for storing model, its restraints, constraints, and particles.
Select hierarchy particles identified by the biological name.
Fit Gaussian-decorated particles to an EM map (also represented with a set of Gaussians).
A macro to build a IMP.pmi.topology.System based on a TopologyReader object.
A macro to help setup and run replica exchange.
Create a restraint between consecutive TempResidue objects or an entire PMI Molecule object.
A class to create an excluded volume restraint for a set of particles at a given resolution.
Automatically setup System and Degrees of Freedom with a formatted text file.
Functionality for loading, creating, manipulating and scoring atomic structures.
IMP::bayesianem.restraint
Restraints for handling electron microscopy maps.
Bayesian Fluorescence Framework.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Basic functionality that is expected to be used by a wide variety of IMP users.
Create movers and set up constraints for PMI objects.
Handles cross-link data sets.
Protocols for sampling structures and analyzing them.
Some miscellaneous simple restraints.
Restraints for handling cross-linking data.
Restraints for handling small angle x-ray (SAXS) data.
Restraints for keeping correct stereochemistry.
Classes to handle different kinds of restraints.
Set of Python classes to create a multi-state, multi-resolution IMP hierarchy.
Python classes to represent, score, sample and analyze models.
Support for the RMF file format for storing hierarchical molecular data and markup.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.
CheckLevel get_check_level()
Get the current audit mode.