In this example, we read a protein from a PDB file and experimental profile file. Next we compute the theoretical profile from the PDB file and fit it to the experimental one. Unlike in profile.py example, here we fit the profile with adjustment of the excluded volume and hydration layer density of the molecule.
This application is available as a web service at salilab.org/foxs. It is also available as C++ code in IMP at modules/foxs/bin/foxs.cpp.
The experimental data for lysozyme is taken from crysol program (www.embl-hamburg.de/ExternalInfo/Research/Sax/crysol.html)
32 print(
'min_q = ' + str(exp_profile.get_min_q()))
33 print(
'max_q = ' + str(exp_profile.get_max_q()))
34 print(
'delta_q = ' + str(exp_profile.get_delta_q()))
37 particles = IMP.atom.get_by_type(mp, IMP.atom.ATOM_TYPE)
41 for i
in range(0, len(particles)):
42 radius = ft.get_radius(particles[i])
46 surface_area = s.get_solvent_accessibility(
IMP.core.XYZRs(particles))
51 model_profile.calculate_profile_partial(particles, surface_area)
55 saxs_score = IMP.saxs.ProfileFitterChi(exp_profile)
56 chi = saxs_score.compute_score(model_profile)
57 print(
'Chi without parameter fitting = ' + str(chi))
59 chi = (saxs_score.fit_profile(model_profile)).get_chi_square()
60 print(
'Chi after adjustment of excluded volume and water layer parameters = '
62 saxs_score.fit_profile(model_profile, 0.95, 1.05, -2.0, 4.0,
False,