{"action":"created","issue":{"url":"https://api.github.com/repos/choderalab/openpathsampling/issues/309","labels_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/309/comments","events_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/309/events","html_url":"https://github.com/choderalab/openpathsampling/pull/309","id":105798898,"number":309,"title":"Add iterables support for samplesets","user":{"login":"jhprinz","id":5091934,"avatar_url":"https://avatars.githubusercontent.com/u/5091934?v=3","gravatar_id":"","url":"https://api.github.com/users/jhprinz","html_url":"https://github.com/jhprinz","followers_url":"https://api.github.com/users/jhprinz/followers","following_url":"https://api.github.com/users/jhprinz/following{/other_user}","gists_url":"https://api.github.com/users/jhprinz/gists{/gist_id}","starred_url":"https://api.github.com/users/jhprinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhprinz/subscriptions","organizations_url":"https://api.github.com/users/jhprinz/orgs","repos_url":"https://api.github.com/users/jhprinz/repos","events_url":"https://api.github.com/users/jhprinz/events{/privacy}","received_events_url":"https://api.github.com/users/jhprinz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dwhswenson","id":8178546,"avatar_url":"https://avatars.githubusercontent.com/u/8178546?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhswenson","html_url":"https://github.com/dwhswenson","followers_url":"https://api.github.com/users/dwhswenson/followers","following_url":"https://api.github.com/users/dwhswenson/following{/other_user}","gists_url":"https://api.github.com/users/dwhswenson/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhswenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhswenson/subscriptions","organizations_url":"https://api.github.com/users/dwhswenson/orgs","repos_url":"https://api.github.com/users/dwhswenson/repos","events_url":"https://api.github.com/users/dwhswenson/events{/privacy}","received_events_url":"https://api.github.com/users/dwhswenson/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-09-10T12:45:37Z","updated_at":"2015-10-20T14:36:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/choderalab/openpathsampling/pulls/309","html_url":"https://github.com/choderalab/openpathsampling/pull/309","diff_url":"https://github.com/choderalab/openpathsampling/pull/309.diff","patch_url":"https://github.com/choderalab/openpathsampling/pull/309.patch"},"body":"This makes it possible to write the following in `SampleSet`s.\r\n\r\n```\r\nsset = st.samplesset[2] # load a sampleset for demonstration\r\nsset[0:3] # return a list of all samples with 0 <= rep_id < 3\r\nsset[[1,3,4]] # return samples with rep_ids 1, 3 and 4\r\nsset[[ens1, ens2]] # return (first) samples in ensemble1, 2 \r\n```\r\n\r\nin iterables all mixtures are allowed\r\n```\r\nsset[[1,3, ens1, ens2]]\r\n```\r\nIterables or Slice will return a generator expression to keep memory consumption small."},"comment":{"url":"https://api.github.com/repos/choderalab/openpathsampling/issues/comments/149587258","html_url":"https://github.com/choderalab/openpathsampling/pull/309#issuecomment-149587258","issue_url":"https://api.github.com/repos/choderalab/openpathsampling/issues/309","id":149587258,"user":{"login":"dwhswenson","id":8178546,"avatar_url":"https://avatars.githubusercontent.com/u/8178546?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhswenson","html_url":"https://github.com/dwhswenson","followers_url":"https://api.github.com/users/dwhswenson/followers","following_url":"https://api.github.com/users/dwhswenson/following{/other_user}","gists_url":"https://api.github.com/users/dwhswenson/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhswenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhswenson/subscriptions","organizations_url":"https://api.github.com/users/dwhswenson/orgs","repos_url":"https://api.github.com/users/dwhswenson/repos","events_url":"https://api.github.com/users/dwhswenson/events{/privacy}","received_events_url":"https://api.github.com/users/dwhswenson/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T14:36:57Z","updated_at":"2015-10-20T14:36:57Z","body":"I'm fine with that. I've been trying to think of situations where a replica ID has semantic value, and there really aren't many. I suppose it could be the file name of the initial trajectory; but I think the user can just as easily keep a dictionary of filename-to-integer if they really need to track that.\r\n\r\nPlease correct the docstrings to reflect what the correct state of the code is, and this will be ready to merge."}}