{"action":"created","issue":{"url":"https://api.github.com/repos/mdtraj/mdtraj/issues/991","labels_url":"https://api.github.com/repos/mdtraj/mdtraj/issues/991/labels{/name}","comments_url":"https://api.github.com/repos/mdtraj/mdtraj/issues/991/comments","events_url":"https://api.github.com/repos/mdtraj/mdtraj/issues/991/events","html_url":"https://github.com/mdtraj/mdtraj/issues/991","id":115785044,"number":991,"title":"Add kwarg to load positions only from the first model?","user":{"login":"rafwiewiora","id":12088757,"avatar_url":"https://avatars.githubusercontent.com/u/12088757?v=3","gravatar_id":"","url":"https://api.github.com/users/rafwiewiora","html_url":"https://github.com/rafwiewiora","followers_url":"https://api.github.com/users/rafwiewiora/followers","following_url":"https://api.github.com/users/rafwiewiora/following{/other_user}","gists_url":"https://api.github.com/users/rafwiewiora/gists{/gist_id}","starred_url":"https://api.github.com/users/rafwiewiora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafwiewiora/subscriptions","organizations_url":"https://api.github.com/users/rafwiewiora/orgs","repos_url":"https://api.github.com/users/rafwiewiora/repos","events_url":"https://api.github.com/users/rafwiewiora/events{/privacy}","received_events_url":"https://api.github.com/users/rafwiewiora/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-09T03:34:26Z","updated_at":"2015-11-12T00:15:10Z","closed_at":null,"body":"Another thing that came up in my whole-PDB analyses - currently 195 files do not load, because they throw the:\r\n```\r\n'PDB Error: All MODELs must contain the same number of ATOMs'\r\n```\r\n[here] (https://github.com/mdtraj/mdtraj/blob/master/mdtraj/formats/pdb/pdbfile.py#L501-L512).\r\n\r\nFrom a quick look, it's stuff like - only some models have waters, there's a proton missing somewhere etc. \r\n\r\nI'd like to add the `use_all_models` kwarg  to `load_pdb` and be able to set it to `False` in my scripts - positions are loaded only from the first model and the problem is avoided. Are you guys ok with adding that in? \r\n\r\nJust to point out using `load_frame` to only load the first frame/model doesn't work because that loads positions for all frames before picking the needed ones anyway. \r\n\r\nOne issue that I'm not yet sure if it will arise, but I'm looking now - in #980 we've added appending CONECT bonds from the last model, but for these files where all models don't have the same atoms it's not clear to me what the meaning of CONECT is - is that ensured to work with the last model in the PDB / first / any other? Looking into that now. Ideally, I want to be able to use the model in those files that gives me as much info as possible. "},"comment":{"url":"https://api.github.com/repos/mdtraj/mdtraj/issues/comments/155954648","html_url":"https://github.com/mdtraj/mdtraj/issues/991#issuecomment-155954648","issue_url":"https://api.github.com/repos/mdtraj/mdtraj/issues/991","id":155954648,"user":{"login":"rmcgibbo","id":641278,"avatar_url":"https://avatars.githubusercontent.com/u/641278?v=3","gravatar_id":"","url":"https://api.github.com/users/rmcgibbo","html_url":"https://github.com/rmcgibbo","followers_url":"https://api.github.com/users/rmcgibbo/followers","following_url":"https://api.github.com/users/rmcgibbo/following{/other_user}","gists_url":"https://api.github.com/users/rmcgibbo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmcgibbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmcgibbo/subscriptions","organizations_url":"https://api.github.com/users/rmcgibbo/orgs","repos_url":"https://api.github.com/users/rmcgibbo/repos","events_url":"https://api.github.com/users/rmcgibbo/events{/privacy}","received_events_url":"https://api.github.com/users/rmcgibbo/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T00:15:10Z","updated_at":"2015-11-12T00:15:10Z","body":"This sounds good to me. Thanks for doing all of this -- it sounds like it was a lot of work. And the fact that many of the bugs you encountered are arguably bugs in the PDB repository as opposed to bugs in the MDTraj code gives me some confidence that, in large part, we're doing things correctly."}}