> I've described each restraint like this: > > rsr.make_distance(at['SG:1'],at['SG:4'],aln,spline_on_site=False,restraint_group=physical.xy_distance,maximal_distance=5) > > I just want both atoms to be, in a maximal distance of 5A.
OK, but that's not what make_distance() does. It builds a set of distance restraints to constrain the model to look like the template(s), and thus is primarily used for building homology derived restraints. This particular example will constrain the SG:1 to SG:4 distance to its value from the template (if residues 1 and 4 in the model are both aligned with a template). To avoid creating too many restraints, if the distance in the template is greater than maximal_distance (5A in this case) the restraint is not created.
What you want is something like that at http://salilab.org/modeller/9v5/manual/node27.html
For this particular example, the following should do what you want, assuming you want to constrain the atom-atom distance to be 5A +/- 0.1A with a Gaussian distribution (harmonic restraint):
rsr.add(forms.gaussian(group=physical.xy_distance, feature=features.distance(at['SG:1'], at['SG:4']), mean=5.0, stdev=0.1))
If you instead want the atom-atom distance to be no greater than 5.0A, you can use forms.upper_bound rather than forms.gaussian. See http://salilab.org/modeller/9v5/manual/node97.html
Ben Webb, Modeller Caretaker