[Chimera-users] Programmatic selection and minimisation

Edelmiro Moman Noval miromoman at gmail.com
Mon Dec 10 19:30:08 PST 2018

Thanks Elaine,

In fact, what I would like to do is to keep any molecule that is close 
to the ligand (including protein chains, water, ions, metals and 
prostetic groups) and delete the rest.

I think that I have that figured out now. For the rest, the preferences 
file it is.

Now the problem are the metals that are not handled by AMBER/GAFF...



On 12/10/18 11:24 PM, Elaine Meng wrote:
> Hi Miro,
> I’m not a programmer but I think I can answer these...
> (2) and (3) I believe that if you run through one minimization using the GUIs, e.g. start with Minimize Structure GUI (in menu under Tools.. Structure Editing), which will then display Dock Prep, AddH, Add Charge GUIs, you can turn on the option “Memorize options chosen in subsequent dialogs” on the Minimize Structure dialog.  After you do that, it will save the options you chose in Dock Prep in your preferences file.
> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/minimize/minimize.html>
> Later when you use the “minimize” command with “nogui true” it will use the settings you previously saved.  Also, it will use the charge method most recently chosen in the Add Charge GUI.  This is mentioned in the “nogui true” description:
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/minimize.html>
> (1) This one is trickier.  Commands like the following would get rid of single residues beyond the zone:
> sel #0:501.a zr<5
> delete solvent & ~ sel
> delete ions & ~ sel
> delete ligand & ~ sel
> The main problem, however, is that then you’d still need to identify whole biopolymer chains (based on connectivity, NOT based on chain ID) without any part in the zone.  One idea is to remove protein helix/strand assignments IDs (assuming that your workflow doesn’t need them for anything) and then use “select up” once to promote protein and nucleic residues to their whole connected chains.
> setattr r isHelix false
> setattr r isStrand false
> setattr r ssId 0
> sel up
> delete protein & ~ sel
> delete nucleic & ~ sel
> (capital letter “i” in ssId, value zero)
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>> On Dec 9, 2018, at 7:27 PM, Miro Moman <miromoman at gmail.com> wrote:
>> Hello,
>> I am trying to use Chimera programmatically in order to automatise a number of tasks.
>> I have tree questions:
>> 1) When I select a zone around the ligand (for instance "runCommand(select #0:501.A zr<5)" the selection level is either atoms or, in this case, residues. Is there a way to select molecules? Because the problem I am finding is that if I run "runCommand(select up)", depending on the PDB file, sometimes I need to do it twice and sometimes three times in order to select the entire molecules (be them proteins or not). I would like to have more control over this function. The purpose being deleting molecules that are far away from the ligand.
>> 2) Right now I am running "DockPrep" followed by "minimize" (without further "prep"). The reason is that "DockPrep" enables me to set options, whereas for "minimize" with "prep" this possibility, if it exists, does not seem to be documented. Is that the case?
>> 3) Finally, in "DockPrep", is there a way to select the charge model explicitly? For instance, to choose Gasteiger charges in order to save time.
>> Kind regards,
>> Miro

Edelmiro Moman, PhD
South Ural State University - SUSU
Южно-Уральский государственный университет - ЮУрГУ
Phone: +7 902 614 73 77
E-mail: miromoman at gmail.com

More information about the Chimera-users mailing list