Re: [ccp4bb] program to complete (or to change) side chains to specific rotamers
Hi all, I answered/thanked Pavel privately for the more involving and expansive learning advice on getting better acquainted with cctbx. coot without the gui - scripting: I imagined that, after all, in general, underlying gui commands are the modules with their parameters/input data and then the resulting outputs. Thanks James for indications/instructions and Paul later on complementing them. Now, I gotta do work/study. Jorge On 2/6/24 16:08, James Holton wrote: Hey Jorge, Did you know coot can be scripted and run without the gui? In general, all you need is to record a session and then edit the session file. A shell script for doing something similar to what you want would look like this: #! /bin/tcsh -f # # set pdbfile = wrong.pdb set mapmtz = refmacout.mtz set chain = A set resnum = 123 set TYP = LEU cat << EOF >! mutate.py imol_coords = handle_read_draw_molecule("$pdbfile") imol_map = make_and_draw_map("$mapmtz","FWT","PHWT","",0,0) set_go_to_atom_chain_residue_atom_name("${chain}",$resnum," CA ") mutate_and_auto_fit(${resnum},"${chain}",imol_coords,imol_map,"${TYP}") with_auto_accept([sphere_refine, 3.5]) save_coordinates(0,"coot.pdb") coot_no_state_real_exit(0) EOF # run the program coot --no-graphics --script mutate.py A difference here is that instead of picking a particular rotamer, you let coot do it for you based on the density. This might sound like a heavyweight approach, but coot actually spins up real fast when it doesn't need to build a graphics window. I note you did ask for a way to specify a rotamer. I say try doing that in coot and record the session. However, if that gets too complicated, another way to do build-by-rotamer is with these awk programs that I wrote long before coot was a thing. I still find them useful for certain tasks. I have created a git repo for them here: https://github.com/jmholton/build_pdb HTH, -James Holton MAD Scientist On 2/6/2024 8:24 AM, Jorge Iulek wrote: Dear all, As I cannot find by myself, maybe someone can indicate here. I would like a program, command line - not gui, that I would simply indicate residues and the desired rotamer, and so it will change the coordinate file to complete/change side chains accordingly, say, somehow like I say for Glu251 make it rotamer tp10, and so on. Less desirable would be to indicate a reference structure for the specific rotamer. But I would really prefer that I indicate the specific residue and the rotamer I want. Is there such a program or any ideas for a combination of programs? Thanks, Jorge To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/ To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/
Re: [ccp4bb] program to complete (or to change) side chains to specific rotamers
I agree with James and for the record, the function that it seem to me that you want is set_residue_to_rotamer_name(imol, chain_id, res_no, ins_code, alt_conf, rotamer_name) Paul. To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/
Re: [ccp4bb] program to complete (or to change) side chains to specific rotamers
Hey Jorge, Did you know coot can be scripted and run without the gui? In general, all you need is to record a session and then edit the session file. A shell script for doing something similar to what you want would look like this: #! /bin/tcsh -f # # set pdbfile = wrong.pdb set mapmtz = refmacout.mtz set chain = A set resnum = 123 set TYP = LEU cat << EOF >! mutate.py imol_coords = handle_read_draw_molecule("$pdbfile") imol_map = make_and_draw_map("$mapmtz","FWT","PHWT","",0,0) set_go_to_atom_chain_residue_atom_name("${chain}",$resnum," CA ") mutate_and_auto_fit(${resnum},"${chain}",imol_coords,imol_map,"${TYP}") with_auto_accept([sphere_refine, 3.5]) save_coordinates(0,"coot.pdb") coot_no_state_real_exit(0) EOF # run the program coot --no-graphics --script mutate.py A difference here is that instead of picking a particular rotamer, you let coot do it for you based on the density. This might sound like a heavyweight approach, but coot actually spins up real fast when it doesn't need to build a graphics window. I note you did ask for a way to specify a rotamer. I say try doing that in coot and record the session. However, if that gets too complicated, another way to do build-by-rotamer is with these awk programs that I wrote long before coot was a thing. I still find them useful for certain tasks. I have created a git repo for them here: https://github.com/jmholton/build_pdb HTH, -James Holton MAD Scientist On 2/6/2024 8:24 AM, Jorge Iulek wrote: Dear all, As I cannot find by myself, maybe someone can indicate here. I would like a program, command line - not gui, that I would simply indicate residues and the desired rotamer, and so it will change the coordinate file to complete/change side chains accordingly, say, somehow like I say for Glu251 make it rotamer tp10, and so on. Less desirable would be to indicate a reference structure for the specific rotamer. But I would really prefer that I indicate the specific residue and the rotamer I want. Is there such a program or any ideas for a combination of programs? Thanks, Jorge To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/ To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/
Re: [ccp4bb] program to complete (or to change) side chains to specific rotamers
Hi Jorge, it'd take about 1 hour of my time to put together a cctbx-based script to do that, or about 2 hours to make an end-user program in Phenix that'll be available in tomorrow's build. But I'm not sure how of general interest this might be to warrant investing time into this. So here is an alternative... If you are familiar with Python coding and cctbx, and are motivated enough to have such a program, I can help navigate you where to look in the cctbx codebase for relevant examples so you can use them to make that program! We can continue discussing this off-list if interested! Cheers, Pavel On Tue, Feb 6, 2024 at 6:22 AM Jorge Iulek wrote: > Dear all, > > > As I cannot find by myself, maybe someone can indicate here. > I would like a program, command line - not gui, that I would > simply > indicate residues and the desired rotamer, and so it will change the > coordinate file to complete/change side chains accordingly, say, somehow > like I say for Glu251 make it rotamer tp10, and so on. > Less desirable would be to indicate a reference structure for the > specific rotamer. But I would really prefer that I indicate the specific > residue and the rotamer I want. > Is there such a program or any ideas for a combination of programs? > Thanks, > > Jorge > > > > To unsubscribe from the CCP4BB list, click the following link: > https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 > > This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a > mailing list hosted by www.jiscmail.ac.uk, terms & conditions are > available at https://www.jiscmail.ac.uk/policyandsecurity/ > To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/
[ccp4bb] program to complete (or to change) side chains to specific rotamers
Dear all, As I cannot find by myself, maybe someone can indicate here. I would like a program, command line - not gui, that I would simply indicate residues and the desired rotamer, and so it will change the coordinate file to complete/change side chains accordingly, say, somehow like I say for Glu251 make it rotamer tp10, and so on. Less desirable would be to indicate a reference structure for the specific rotamer. But I would really prefer that I indicate the specific residue and the rotamer I want. Is there such a program or any ideas for a combination of programs? Thanks, Jorge To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/