Hi Jared and Jordan,

Just want to clarify that dots for hierarchical grouping is optional. Any name 
can be put into a group, with the "group" command. Grouping can happen 
automatically with dots, depending on the "group_auto_mode" setting.

Relevant settings for dotted name handling:
group_auto_mode
group_full_member_names

Group command:
http://pymolwiki.org/index.php/Group

There is no proper API to get the (first-order) children of a group. You can 
get all molecular object children (including children from nested groups) by:

cmd.get_object_list('(groupname)')

Hope that helps.

Cheers,
  Thomas

On 25 Jan 2016, at 17:33, Sampson, Jared M. <jms2...@cumc.columbia.edu> wrote:

> Hi Jordan - 
> 
> Grouped object names use dots to indicate group inheritance ("groupA.obj1"), 
> so maybe try something like this:
> 
> ```
> from pymol import stored
> 
> stored.group_names = []
> group_name = "groupA"
> for obj in cmd.get_names():
>       if obj[0:len(group_name)] == group_name:
>               # either add them to a list to use later
>               stored.group_names.append(obj)
>               # or run your `iterate` command here
>               #cmd.iterate(...)
> print sorted(stored.group_names)
> 
> ```
> 
> For me the printed dummy output looks like:
> ['groupA', 'groupA.obj1', 'groupA.obj2', ... ]
> 
> Hope that helps.
> 
> Cheers,
> Jared
> 
>> On Jan 25, 2016, at 2:34 PM, Jordan Willis <jwillis0...@gmail.com> wrote:
>> 
>> Hi,
>> 
>> Is there a way to iterate through the names that have been grouped? 
>> 
>> iterate <groupName>
>> 
>> doesn’t seem to do it because it kills my pymol app.
>> 
>> Jordan

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to