Hi Fred, You can select the dummy atoms to keep via the id identifier by entering the following command at the PyMOL prompt:
select keep, id 1 or id 6 or id 12 or id 18 or id 24 Then you could remove the dummy atoms outside of the selection by entering the following command at the PyMOL prompt: remove not keep To count the number of dummy atoms, you can enter the following command at the PyMOL prompt: count_atoms Say you have 6000 dummy atoms, making the above selection by hand will be tedious. You can enter Python code at the PyMOL prompt to generate the selection. Enter the following command to make a list of every 6th integer. kid = [x * 6 for x in range(1000)] Now unpack the list called 'kid' onto one line with the required format. It is critical that retain the whitespaces in ' or id '. print(*kid, sep=' or id ') Replace the "0 " at the first entry with "id 1 ". Now use this expression to create the selection called "keep" in the first command above. Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: belzebub [belze...@gmx.org] Sent: Wednesday, July 22, 2020 4:36 AM To: pymol-users@lists.sourceforge.net Subject: [EXTERNAL] [PyMOL] Remove/keep every n_th (dummy) atom of a selection Hi guys, I'm quite new to Pymol and facing some hurdle that costs a lot of time. Maybe someone of you knows a quick solution. I have a selection (sele) of dummy atoms and need to reduce the number of these atoms to about 15-20. To be more precise, I want to - keep 1 atom - remove e.g. the next 5 atoms - keep 1 atom - remove e.g. the next 5 atoms - and so on Is there an easy way to accomplish that directly on the Pymol command line? Many thanks in advance! Fred _______________________________________________ PyMOL-users mailing list Archives: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_pymol-2Dusers-40lists.sourceforge.net&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=bZZaGoLugmDfENTSTCkZprkhjwaZNo8K_UGYvWEyXvc&s=EQ7VC6grdvKeEsiIb3BMDZ_wh9Bd0yrJq3qQwgRDIRU&e= Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceforge.net_projects_pymol_lists_pymol-2Dusers_unsubscribe&d=DwICAg&c=VjzId-SM5S6aVB_cCGQ0d3uo9UfKByQ3sI6Audoy6dY&r=k0gMbcsdOcdbPUNV5tW66KQSZfXL0ewVDPVBp7tqbks&m=bZZaGoLugmDfENTSTCkZprkhjwaZNo8K_UGYvWEyXvc&s=YgUI5_-j1V5ocNJTOQlMSRzFG1SEmsYd1MdMhIfgWcU&e= _______________________________________________ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe