{"action":"created","issue":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/2188","repository_url":"https://api.github.com/repos/pandegroup/openmm","labels_url":"https://api.github.com/repos/pandegroup/openmm/issues/2188/labels{/name}","comments_url":"https://api.github.com/repos/pandegroup/openmm/issues/2188/comments","events_url":"https://api.github.com/repos/pandegroup/openmm/issues/2188/events","html_url":"https://github.com/pandegroup/openmm/issues/2188","id":369291557,"node_id":"MDU6SXNzdWUzNjkyOTE1NTc=","number":2188,"title":"Confusion about PBC in CUDA plugin","user":{"login":"jlmaccal","id":108119,"node_id":"MDQ6VXNlcjEwODExOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/108119?v=4","gravatar_id":"","url":"https://api.github.com/users/jlmaccal","html_url":"https://github.com/jlmaccal","followers_url":"https://api.github.com/users/jlmaccal/followers","following_url":"https://api.github.com/users/jlmaccal/following{/other_user}","gists_url":"https://api.github.com/users/jlmaccal/gists{/gist_id}","starred_url":"https://api.github.com/users/jlmaccal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlmaccal/subscriptions","organizations_url":"https://api.github.com/users/jlmaccal/orgs","repos_url":"https://api.github.com/users/jlmaccal/repos","events_url":"https://api.github.com/users/jlmaccal/events{/privacy}","received_events_url":"https://api.github.com/users/jlmaccal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-11T20:26:46Z","updated_at":"2018-10-11T22:02:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"We're trying to extend our MELD plugin to work correctly with PBCs. What we would like to do is to consider particles connected by MELD restraints to be part of the same molecule, so that they are imaged together as a single unit.\r\n\r\nTo that end, we have implemented `getBondedParticles` in the `MeldForceImpl`. I can verify that this method is called and is returning the correct information. However, we appear to be getting wrapped coordinates in our cuda kernel, which leads to distances being wrong.\r\n\r\nWe have the following test system:\r\n- two particles at `(1.0, 0.0, 0.0)` and `(6.0, 0.0, 0.0)`\r\n- box vectors of `(3.0, 0.0, 0.0)`, `(0.0, 3.0, 0.0)`, `(0.0, 0.0, 3.0)`\r\n- we add a `NonbondedForce` with `CutoffPeriodic` to force the system to use PBC\r\n- we add a MELD restraint between the two particles\r\n\r\nIf I set the positions in the context and then fetch them out in the state, we get `(-2.0, 0.0, 0.0)` and `(3.0, 0.0, 0.0)` as I expect. If I remove the meld force, we get `(1.0, 0.0, 0.0)` and `(0.0, 0.0, 0.0)`, again as expected (because without the MELD force, the two particles are not part of the same molecule).\r\n\r\nHowever, inside of our kernel, `posq` has wrapped coordinates (1.0, 0.0, 0.0) and (0.0, 0.0, 0.0), which isn't what I expect. Basically, I don't understand why I'm getting wrapped coordinates inside of my kernel or how to avoid it.\r\n\r\nAlso, it isn't clear to me how openmm decides if it should be using PBC or not. My class's `usesPeriodicBoundaryConditions` method is never called."},"comment":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/comments/429134115","html_url":"https://github.com/pandegroup/openmm/issues/2188#issuecomment-429134115","issue_url":"https://api.github.com/repos/pandegroup/openmm/issues/2188","id":429134115,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTEzNDExNQ==","user":{"login":"jlmaccal","id":108119,"node_id":"MDQ6VXNlcjEwODExOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/108119?v=4","gravatar_id":"","url":"https://api.github.com/users/jlmaccal","html_url":"https://github.com/jlmaccal","followers_url":"https://api.github.com/users/jlmaccal/followers","following_url":"https://api.github.com/users/jlmaccal/following{/other_user}","gists_url":"https://api.github.com/users/jlmaccal/gists{/gist_id}","starred_url":"https://api.github.com/users/jlmaccal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlmaccal/subscriptions","organizations_url":"https://api.github.com/users/jlmaccal/orgs","repos_url":"https://api.github.com/users/jlmaccal/repos","events_url":"https://api.github.com/users/jlmaccal/events{/privacy}","received_events_url":"https://api.github.com/users/jlmaccal/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T22:02:13Z","updated_at":"2018-10-11T22:02:13Z","author_association":"CONTRIBUTOR","body":"I see! Missed that entirely.\r\n\r\nHow does this get used? E.g. should I dihedral be a group of 4, or would it be sufficient to give 3 groups of 2, corresponding to the 3 bonds.\r\n\r\nBasically, is OpenMM doing enough graph theory to infer that all of those particles need to be images together?"}}
{"actor":{"display_login":"jlmaccal"}}