[phenixbb] positional restraints in real_space_refine?

Tristan Croll tic20 at cam.ac.uk
Tue Oct 8 08:47:08 PDT 2019

As promised, here's a quick run-down of how you can currently implement 
bulk positional targets in ISOLDE. This requires a combination of 
commands via the ChimeraX command line (the bar under the main GUI 
window) and the Python shell (accessible via Tools/General/Shell). 
Eventually this will all be doable via the command line, but not quite 
yet. The instructions assume that your main model is model #1 and is 
ready to go in ISOLDE, and each rigid-body docked fragment corresponds 
exactly to some part of your main model.

Best regards,


# Preliminaries on the command line: apply adaptive distance restraints
# to keep the overall geometry controlled: "isolde restrain distances 

# Preliminaries in the shell:

m = session.isolde.selected_model
from chimerax.atomic import selected_atoms
from chimerax.isolde import session_extensions as sx

prm = sx.get_position_restraint_mgr(m)

# Now, in the GUI or via the command line, select the first set of atoms
# you want to move - e.g. "select #1/A:1-100 at CA" to select all CA atoms
# in residues 1 to 100 of chain A in model #1.

# in the shell:

tomove_1 = selected_atoms(session)

# on the command line, select the *exactly* corresponding atoms from 
# first rigid-body docked fragment - this will most likely be as simple 
# changing the model number in the previous command

target_1 = selected_atoms(session)

prs_1 = prm.add_restraints(tomove_1)
prs_1.targets = target_1.scene_coords
prs_1.spring_constants = 100
# Units here are in kJ/mol/nm^2. This value is very weak, and is a good 
# point when your starting coordinates are far from the target. As the 
# converges you might consider increasing these 10-fold or so - you can 
# them at any time using 'prs_1.spring_constants = {new value}' and 
# automatically update in the simulation. The restraints themselves 
mostly act
# as simple harmonic potentials, but switch to constant force beyond a 
(quite high,
# but still stable) cut-off. In general, as long as you're also using 
# adaptive distance restraints they should be well-behaved even if your 
target is
# many tens of Angstroms from the starting coordinates.

prs_1.enableds = True
# Each target position will appear as a yellow pin in the main GUI, 
connected to
# its atom by a yellow dotted line.

# Now repeat the above for each other docked fragment. Once done, you 
can close
# the docked fragment models if you wish. Select your model and press 
# play button. If you wish to monitor some numeric indicator of 
convergence as
# well as simply watching, you can get the mean difference between 
current and
# target positions for a set of restraints with a little Numpy:

import numpy

axis=1)), axis=0)

# Once you're happy with the result, stop the simulation. You can 
disable the
# position restraints using:

prs_1.enableds = False

# ... but if you intend to continue in this modelling session, it's a 
little more
# efficient to delete them entirely (disabled position restraints are 
# present in simulations, in case you want to re-enable them).
# WARNING: you MUST ensure the simulation is stopped (not just paused) 
before doing
# this. If you forget, you'll still be able to save your coordinates but 
# session will be otherwise fried.
# This can be done via the model panel or in the shell. on the model 
# expand the entry corresponding to the model itself (this will have the 
name of
# the original coordinates file, and in most circumstances will be model 
# find the "Position Restraints" entry, select it and press the "Close" 
# Do the same for the "Adaptive Distance Restraints" entry. In the 

adrm = sx.get_adaptive_distance_restraint_mgr(m)

On 2019-10-07 17:14, Tristan Croll wrote:
> Ok. I've been a bit tied up today, but will try to get them together
> tomorrow. If you have access to a powerful enough GPU machine and the
> changes aren't *too* large, you could try the following right now:
> - Load your model/map in ChimeraX, start ISOLDE and associate the
> model with the map, ready to go
> - Add hydrogens if you haven't already using the 'addh' command on the
> ChimeraX command line
> - Assuming your model is #1 (check the Models panel if you're not
> sure), do 'isolde restrain distances #1' to set up a web of distance
> restraints
> - On the ISOLDE 'Sim settings' tab, increase the mask radius to the
> approximate distance necessary to cover the biggest move you expect
> - Click the 'Show map settings dialogue' button and reduce the Weight
> term to about half (generally when you're doing big moves you want the
> map to pull quite weakly)
> - Start a simulation covering the whole model ('select #1', then press
> ISOLDE's play button)
> - Reduce the display to a backbone trace by hiding everything but the
> CA and P atoms: 'hide ~@CA,P'
> - select the atoms you want to tug on (e.g. 'select /A:20-30')
> - click the 'tug selected atoms' button (third from bottom left on the
> ISOLDE panel)
> - Now, clicking and dragging with the right mouse button will tug on
> the selection - line it up so the direction you want to pull is in the
> plane of the screen, and go for it. I find that tugging in short
> bursts rather than one continuous pull yields the best results. The
> distance restraints are designed to restrain local geometry while
> allowing large conformational changes, so in general things should
> remain under control. If you need to (i.e. in places where the
> conformation *really* changes) you can release the restraints on some
> atoms by selecting them, then typing the command, 'isolde release
> distances sel'.
> Best regards,
> Tristan
> On 2019-10-07 10:09, Daniel Larsson wrote:
>> Tristan, it would be very nice if you could write it up. Thank you so 
>> much!
>> Regards,
>> Daniel
>>> On 2019-10-04, at 23:09, Tristan Croll <tic20 at cam.ac.uk> wrote:
>>> I’ve done something quite like this in ISOLDE with a fair bit of 
>>> success: rigid-body docked individual domains into density, then 
>>> using these to define target positions for flexible fitting of the 
>>> unbroken complete model from a markedly different configuration. This 
>>> currently requires a little work in the ChimeraX shell to set up, but 
>>> is fairly straightforward. Let me know if you’re interested and I can 
>>> write up some instructions.
>>> Tristan Croll
>>> Research Fellow
>>> Cambridge Institute for Medical Research
>>> University of Cambridge CB2 0XY
>>>> On 3 Oct 2019, at 11:24, Daniel Larsson <daniel.larsson at icm.uu.se> 
>>>> wrote:
>>>> Hi all,
>>>> I'm working on a cryo-EM reconstruction where I have some flexible 
>>>> low-resolution elements (RNA double helices). They have different 
>>>> orientations relative to my reference model, but I would like to 
>>>> model them in the approximately correct position. I've tried 
>>>> real_space_refine with morphing and simulated annealing, but neither 
>>>> accomplish what I want. Now I'm thinking of cutting out these 
>>>> helices and manually position them approximately where I want them. 
>>>> But I fear that this will case headache at the "joint". Is it 
>>>> possible to use the manual positions as a reference for positional 
>>>> restraints, but use the original model as the reference for the 
>>>> torsion angles. Is this possible with real_space_refine? Or is there 
>>>> a better way of refining this structure?
>>>> Regards,
>>>> Daniel
>>>> När du har kontakt med oss på Uppsala universitet med e-post så 
>>>> innebär det att vi behandlar dina personuppgifter. För att läsa mer 
>>>> om hur vi gör det kan du läsa här: 
>>>> http://www.uu.se/om-uu/dataskydd-personuppgifter/
>>>> E-mailing Uppsala University means that we will process your 
>>>> personal data. For more information on how this is performed, please 
>>>> read here: http://www.uu.se/en/about-uu/data-protection-policy
>>>> _______________________________________________
>>>> phenixbb mailing list
>>>> phenixbb at phenix-online.org
>>>> http://phenix-online.org/mailman/listinfo/phenixbb
>>>> Unsubscribe: phenixbb-leave at phenix-online.org
> _______________________________________________
> phenixbb mailing list
> phenixbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/phenixbb
> Unsubscribe: phenixbb-leave at phenix-online.org

More information about the phenixbb mailing list