Re: [PyMOL] Capping of multiple pdb file using python script in pymol

2021-10-14 Thread shivani sharma
Hi Thomas, Thanks for your reply. I am currently using: *import __mainmain__.pymol_argv = ['pymol','-qc']from pymol import cmd, editorpymol.finish_launching()import globimport ospath = os.path.dirname(pymol.__script__)pdb_files = glob.glob(os.path.join(path,

Re: [PyMOL] Capping of multiple pdb file using python script in pymol

2021-10-13 Thread Thomas Holder
Hi Shivani, Your selection needs to be object-specific, e.g. like this: for filename in glob("*.pdb"): cmd.load(filename) obj = filename[:-4] editor.attach_amino_acid(obj + " and resi 10 and name N", 'ace') Hope that helps. Cheers, Thomas > On Oct 9, 2021, at 21:18, shivani sharma

[PyMOL] Capping of multiple pdb file using python script in pymol

2021-10-09 Thread shivani sharma
Hi everyone, I am trying to cap (with ace and nme) various *.pdbs. I made a folder, where I have placed *.py file and *.pdb files. When I load the run following script: from pymol import cmd, editor from glob import glob for filename in glob("*.pdb"): cmd.load(filename)