On 03/11/2023 20:57, Ma, Boyuan wrote:

Dear Cooters,

I want to use a python script to select several disconnected fragments to perform refinement in one time, for example, "coot.some_refinement_by_residue_range(imol, /1/A/1-20 || /1/A/22-30)."

However, after searching previous messages in the mail list, I still do not know what the right format is for selecting these fragments in one string.


BTW, thanks for Joel's answers. https://www.mail-archive.com/coot@jiscmail.ac.uk/msg01933.html. It does help me a lot.

"atom_selection_string is the 'standard' mmdb atom selection string, explained in detail in the *mmdb manual*." And the mmdb manual can be seen at here: https://www.ccp4.ac.uk/html/pdbcur.html#atom_selection <https://www.ccp4.ac.uk/html/pdbcur.html#atom_selection>



Crikey - that was a while ago (hello Joel).


I presume that you are using Coot 0.9x.


There is a "new" API interface to the real space refinement now: refine_residues() which takes a list of residue specs



def make_res_range(start_res_no, end_res_no):
    l = range(start_res_no, end_res_no + 1)
    r = [["A", i, ""] for i in l]
    return r

range_1 = make_res_range(10, 20)
range_2 = make_res_range(30, 40)

combi_range = range_1 + range_2

imol = read_pdb("tutorial-modern.pdb")
imol_map = read_mtz("rnasa-1.8-all_refmac1.mtz", "FWT", "PHWT", "", 0, 0)

refine_residues(imol, combi_range)

(Needless to say, this is different in the new version).


Regards,


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/

Reply via email to