On 21/07/2022 10:49, Filomeno Sanchez Rodriguez wrote:
I finally managed to write a script to do this, I will leave it here for future 
reference in case someone has the same question:

      # Auto-correct nomenclature errors
      set_nomenclature_errors_on_read("auto-correct")
      # Read in the PDB model
      mol_id = read_pdb('input_model.pdb')
      # Do not ask about accept/reject refinement
      set_refinement_immediate_replacement(1)
      # Refine zone -> refine_zone(mol_id, ch_id, res_start, res_end, altloc)
      refine_zone(mol_id, 'A', 44, 64, '')
      # Accept refinement
      accept_regularizement()
      # Write refined model
      write_pdb_file(mol_id, 'refined_model.pdb')
      # Exit
      coot_real_exit(0)

The script can then be executed with:
     coot --no-graphics --map input.map --script script.py


You can add the reading of the map to the script if you like using

read_ccp4_map("input.map", 0)


accept_moving_atoms() is now the preferred function name.


refine_residues(imol, residue_spec_list) is the modern interface to refinement, where a residue spec is [chain_id, res_no, ins_code]


If you want to use coot's real space refinement without using a script, you can use coot-mini-rsr.


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