Mutate a single residue in a pdb with python and Modeller

From this modeller wiki page:

The script below takes a given PDB file, and mutates a single residue. The residue’s position is then optimized, and the unoptimized and optimized energies are reported.

Note that this script if run multiple times will produce the same model each time, because Modeller is deterministic. If you want to build multiple models, change the value of rand_seed (see comments in the script) each time. This may be useful if some models, for example, cannot be optimized due to steric clashes.

If you want to ask me a question or leave me a message add @bougui505 in your comment.