From: Thomas H. <tho...@sc...> - 2017-11-18 09:04:30
|
Hi Simon, I think this is the code you're looking for: from pymol import cmd, editor cmd.set('retain_order', 0) cmd.fab('APAPAPAP') editor.attach_amino_acid("last name C", 'nme') editor.attach_amino_acid("first name N", 'ace') Hope that helps. Cheers, Thomas > On Nov 17, 2017, at 8:26 AM, Simon Kit Sang Chu <sim...@gm...> wrote: > > Hi everyone, > > I am generating segments of peptide to be used in GROMACS. I might be using amber which does not allow automatic capping. Therefore, I hope to solve it with Pymol. > > Currently, I use a pml scipt to generate the pdb file automatically. The script is simple. > > for aa in "APAPAPAP" : cmd._alt(string.lower(aa)) > cmd.save("peptide.pdb") > > However, if I want to add NME and ACE caps, is there any residue code available? Like XAPAPAPAPY where X and Y are NME and ACE? The main point is to automize the process since I don't want to write NME / ACE manually everytime. > > I appreciate any suggestion and comment. > > Regards, > Simon -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |