{"action":"created","issue":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/372","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/372/comments","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/372/events","html_url":"https://github.com/MDAnalysis/mdanalysis/issues/372","id":97854609,"number":372,"title":"Proposal: AtomGroup API: convert some methods to properties","user":{"login":"orbeckst","id":237980,"avatar_url":"https://avatars.githubusercontent.com/u/237980?v=3","gravatar_id":"","url":"https://api.github.com/users/orbeckst","html_url":"https://github.com/orbeckst","followers_url":"https://api.github.com/users/orbeckst/followers","following_url":"https://api.github.com/users/orbeckst/following{/other_user}","gists_url":"https://api.github.com/users/orbeckst/gists{/gist_id}","starred_url":"https://api.github.com/users/orbeckst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbeckst/subscriptions","organizations_url":"https://api.github.com/users/orbeckst/orgs","repos_url":"https://api.github.com/users/orbeckst/repos","events_url":"https://api.github.com/users/orbeckst/events{/privacy}","received_events_url":"https://api.github.com/users/orbeckst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/API","name":"API","color":"eb6420"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"richardjgowers","id":9249543,"avatar_url":"https://avatars.githubusercontent.com/u/9249543?v=3","gravatar_id":"","url":"https://api.github.com/users/richardjgowers","html_url":"https://github.com/richardjgowers","followers_url":"https://api.github.com/users/richardjgowers/followers","following_url":"https://api.github.com/users/richardjgowers/following{/other_user}","gists_url":"https://api.github.com/users/richardjgowers/gists{/gist_id}","starred_url":"https://api.github.com/users/richardjgowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardjgowers/subscriptions","organizations_url":"https://api.github.com/users/richardjgowers/orgs","repos_url":"https://api.github.com/users/richardjgowers/repos","events_url":"https://api.github.com/users/richardjgowers/events{/privacy}","received_events_url":"https://api.github.com/users/richardjgowers/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/3","html_url":"https://github.com/MDAnalysis/mdanalysis/milestones/0.11","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/3/labels","id":1076757,"number":3,"title":"0.11","description":"API overhaul release","creator":{"login":"richardjgowers","id":9249543,"avatar_url":"https://avatars.githubusercontent.com/u/9249543?v=3","gravatar_id":"","url":"https://api.github.com/users/richardjgowers","html_url":"https://github.com/richardjgowers","followers_url":"https://api.github.com/users/richardjgowers/followers","following_url":"https://api.github.com/users/richardjgowers/following{/other_user}","gists_url":"https://api.github.com/users/richardjgowers/gists{/gist_id}","starred_url":"https://api.github.com/users/richardjgowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardjgowers/subscriptions","organizations_url":"https://api.github.com/users/richardjgowers/orgs","repos_url":"https://api.github.com/users/richardjgowers/repos","events_url":"https://api.github.com/users/richardjgowers/events{/privacy}","received_events_url":"https://api.github.com/users/richardjgowers/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":51,"state":"open","created_at":"2015-04-21T09:19:32Z","updated_at":"2015-07-29T14:25:40Z","due_on":"2015-08-07T06:00:00Z","closed_at":null},"comments":7,"created_at":"2015-07-29T03:59:34Z","updated_at":"2015-07-29T19:37:06Z","closed_at":null,"body":"We should discuss if we also want to break the AtomGroup API with 0.11.0, as discussed on and off on the developer list (@richardjgowers , @mnmelo ): [request for discussion: changing parts of AtomGroup API](https://groups.google.com/d/msg/mdnalysis-devel/jxEns_KC0xY/kDdlDe0W_R4J). A number of methods of AtomGroup are really conceptually more attributes (typically, quantities derived from the topology) so a good case can be made to turn them into managed properties. (I cannot remember if there was a specific rationale in the early days why they were methods – maybe @nmichaud remembers...?)\r\n\r\nThe 0.11.0 release would be a (comparatively) good time because other stuff changes, too, and if users need to rework their code then they should really only have to do it once. (Users will hate the changes outlined here because they *will* break code in cryptic ways and I don't see a way to have the same method and property co-exist for a while.)\r\n\r\nI'd like to open a discussion with a focus on \r\n\r\n1. Do we want to change this? Is this *really* necessary?\r\n2. What is the full list of changes needed? (We are unlikely to do a second major API break before 1.0 so this should be it so if we want to do this we will set a new target date for 0.11.0.) \r\n3. How can we mitigate the pain for users? Can we write a script that helps with the code transformation?\r\n\r\n\r\n## Proposal\r\n\r\nTurn methods that mainly report on topology properties into managed attributes.\r\nFor example:\r\n\r\n```python\r\nag.resids()    --->   ag.resids\r\n```\r\nProvide setters when possible and replace the corresponding `set_*` methods:\r\n```python\r\n# old (currently)\r\nag.set_resname(['ALA', 'ALA'])\r\n\r\n# new (proposed)\r\nag.resnames = ['ALA', 'ALA']\r\n```\r\n\r\n\r\n## AtomGroup methods to be changed\r\nI suggest the following methods to be converted to managed attributes:\r\n\r\n*    \tbfactors  (currently attribute but scheduled to become a method, so actually keep as attribute )\r\n*   \tcharges\r\n*    \tindices\r\n*    \tmasses\r\n*    \tnames\r\n*    \tradii\r\n*    \tresids\r\n*    \tresnames\r\n*    \tresnums\r\n*    \tsegids\r\n"},"comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments/126070695","html_url":"https://github.com/MDAnalysis/mdanalysis/issues/372#issuecomment-126070695","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/372","id":126070695,"user":{"login":"richardjgowers","id":9249543,"avatar_url":"https://avatars.githubusercontent.com/u/9249543?v=3","gravatar_id":"","url":"https://api.github.com/users/richardjgowers","html_url":"https://github.com/richardjgowers","followers_url":"https://api.github.com/users/richardjgowers/followers","following_url":"https://api.github.com/users/richardjgowers/following{/other_user}","gists_url":"https://api.github.com/users/richardjgowers/gists{/gist_id}","starred_url":"https://api.github.com/users/richardjgowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardjgowers/subscriptions","organizations_url":"https://api.github.com/users/richardjgowers/orgs","repos_url":"https://api.github.com/users/richardjgowers/repos","events_url":"https://api.github.com/users/richardjgowers/events{/privacy}","received_events_url":"https://api.github.com/users/richardjgowers/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T19:37:06Z","updated_at":"2015-07-29T19:37:06Z","body":"So another thing I've found, atoms have the `number` property, and the plural of this is `indices`.  So should Atoms have `index`, or AtomGroup have `numbers`?"}}