imp
imp copied to clipboard
Add IMP::atom::mutate_residue
A user may need to read in a PDB file but want several positions mutated. Doing this by hand in external programs can be time-consuming. It'd be nice if, after reading in a PDB file, they could then pass a Residue from the hierarchy to a method called IMP::atom::mutate_residue(Residue res, ResidueType rt) which would rename the residue accordingly, remove any atom types not shared between the res and the passed rt, and then add and setup the missing atoms. It should probably also set the default sidechain coordinates using something like CHARMM idealized coordinates (or maybe IMP::modeller has a way to do this?).
This method only be used during setup.
It is easily done in Scwrl On Feb 10, 2016 10:08 AM, "Seth Axen" [email protected] wrote:
A user may need to read in a PDB file but want several positions mutated. Doing this by hand in external programs can be time-consuming. It'd be nice if, after reading in a PDB file, they could then pass a Residue from the hierarchy to a method called IMP::atom::mutate_residue(Residue res, ResidueType rt) which would rename the residue accordingly, remove any atom types not shared between the res and the passed rt, and then add and setup the missing atoms. It should probably also set the default sidechain coordinates using something like CHARMM idealized coordinates (or maybe IMP::modeller has a way to do this?).
This method only be used during setup.
— Reply to this email directly or view it on GitHub https://github.com/salilab/imp/issues/934.
This is straightforward to do with existing IMP code, e.g. to mutate the 4th residue to valine and then add any new atoms from internal coordinates:
m = IMP.Model()
prot = IMP.atom.read_pdb("in.pdb", m,
IMP.atom.NonWaterNonHydrogenPDBSelector())
res = IMP.atom.get_by_type(prot, IMP.atom.RESIDUE_TYPE)
IMP.atom.Residue(res[3]).set_residue_type(IMP.atom.VAL)
ff = IMP.atom.get_heavy_atom_CHARMM_parameters()
topology = ff.create_topology(prot)
topology.apply_default_patches()
topology.setup_hierarchy(prot)
IMP.atom.write_pdb(prot, 'out.pdb')
As nobody else has asked for this, it probably doesn't make sense to provide a specialized function for it.