Re: [modeller_usage] Is it possible to control atom movements of specific residue during optimization?
To: Mahesh Velusamy <>,
Subject: Re: [modeller_usage] Is it possible to control atom movements of specific residue during optimization?
From: Modeller Caretaker <>
Date: Wed, 7 Dec 2016 11:55:49 -0800
On 12/7/16 11:44 AM, Mahesh Velusamy wrote:
I have been doing separate optimization steps on selected region where i
experienced that certain residue(ARG,LYS,TYR) atoms get distorted (like
bonds between two atoms were distorted). So is their anyway to control the
random deviation of certain residues atoms.
You can't control how they are moved during optimization (since that's a
function of the first derivatives) but you can certainly control how
much they're initially randomized by. Just make separate selections and
randomize them differently (or not at all, potentially).
For example:
# all atoms for optimization
all_sel = selection(...)
# subset of these atoms in 'certain residues'
badres = all_sel.only_residue_types('ARG LYS TYR')
# remaining subset
goodres = all_sel - badres
# randomize bad residues less than good ones
goodres.randomize_xyz(deviation=10.0)
badres.randomize_xyz(deviation=1.0)
Note that randomize_xyz() already does something similar for residues
containing rings to avoid this issue: