Hi Paul,

cool, thanks a lot! I had a try on something you have outlined below and failed.
I will have a try with both solutions.

Thanks again and best wishes,
Guenter
On Wed, 2021-06-23 at 16:24 +0200, Guenter Fritz wrote:
I am running a very short python script in coot to do some automatic
fitting. So far I used the fit_protein option. I  want to have a try on
auto_fit_best_rotamer. If possible I would like to fit sidechains of all
residues or a selection of residues.
OK. Have a look at backrub-rotamers-for-chain in scheme/fitting.scm

I didn't get around to translating it, it seems. But you can. Just tweak the 
syntax to use prefix notation, add a few
commas and you should be good.

Arguments are: auto-fit-best-rotamer (resno alt-loc ins-code chain-id
imol-coords imol-map clash-flag lowest-rotamer-probability)

And I want to have something like below, the arguments I want to change
marked by question marks:

auto_fit_best_rotamer( ?residues x-y?, "", "", "", 0, 0,
?maybe-no-clash-flag? , 0.01)
Alternatively this is how you'd iterate over all chains. You can add a test for 
your particular chain if you wish

         clash_flag = 1
        for chain_id in chain_ids(imol):
          if not is_solvent_chain_qm(imol,chain_id):
             n_residues = chain_n_residues(chain_id,imol)       
             for serial_number in range(n_residues):
                 res_name = resname_from_serial_number(imol, chain_id, 
serial_number)
                 res_no = seqnum_from_serial_number(imol, chain_id, 
serial_number)
                 ins_code = insertion_code_from_serial_number(imol, chain_id, 
serial_number)
                 res_atoms = residue_info(imol, chain_id, res_no, ins_code)
if ins_code is not None:
                     if len(res_atoms) > 3:
                         alt_conf = "" # don't fit residues with alt confs
                         auto_fit_best_rotamer(res_no, alt_conf, ins_code, 
chain_id, imol, imol_map, clash_flag, 0.1)


Paul

########################################################################

To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT&A=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/

########################################################################

To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT&A=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/

Reply via email to