{"action":"created","issue":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/1107","labels_url":"https://api.github.com/repos/pandegroup/openmm/issues/1107/labels{/name}","comments_url":"https://api.github.com/repos/pandegroup/openmm/issues/1107/comments","events_url":"https://api.github.com/repos/pandegroup/openmm/issues/1107/events","html_url":"https://github.com/pandegroup/openmm/issues/1107","id":103123674,"number":1107,"title":"Center of mass force","user":{"login":"peastman","id":4379786,"avatar_url":"https://avatars.githubusercontent.com/u/4379786?v=3","gravatar_id":"","url":"https://api.github.com/users/peastman","html_url":"https://github.com/peastman","followers_url":"https://api.github.com/users/peastman/followers","following_url":"https://api.github.com/users/peastman/following{/other_user}","gists_url":"https://api.github.com/users/peastman/gists{/gist_id}","starred_url":"https://api.github.com/users/peastman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peastman/subscriptions","organizations_url":"https://api.github.com/users/peastman/orgs","repos_url":"https://api.github.com/users/peastman/repos","events_url":"https://api.github.com/users/peastman/events{/privacy}","received_events_url":"https://api.github.com/users/peastman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pandegroup/openmm/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":47,"created_at":"2015-08-25T21:43:11Z","updated_at":"2015-09-01T16:29:44Z","closed_at":null,"body":"I'm looking into creating a new custom force to address a class of features that get requested every now and then.  The most common form of the request is for a harmonic restraint between the centers of mass of two groups of atoms.  I've also seen a request for a restraint between the center of mass of a single group of atoms and a fixed position.  Other variations include a non-harmonic force, or something based on the centroid rather than center of mass.  Then there was the force @jlmaccal requested a few years ago (and eventually wrote a plugin for) based on the mean of r^-6 for all distances between two groups of atoms.  That case is rather different in that it starts by computing an average over two particle terms rather than a set of averages over one particle terms.  But maybe we could create something general enough to handle even that?\r\n\r\nAnyway, I'm looking for suggestions about the design of this force.  One option would be something like a CustomCompoundBondForce, but you would also define groups of atoms, and each \"bond\" would be computed based on the center of mass positions of groups, rather than the positions of individual atoms.  But I can think of other possible designs too, and I'm not really sure what other sorts of interactions people might want to use this for."},"comment":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/comments/136782460","html_url":"https://github.com/pandegroup/openmm/issues/1107#issuecomment-136782460","issue_url":"https://api.github.com/repos/pandegroup/openmm/issues/1107","id":136782460,"user":{"login":"peastman","id":4379786,"avatar_url":"https://avatars.githubusercontent.com/u/4379786?v=3","gravatar_id":"","url":"https://api.github.com/users/peastman","html_url":"https://github.com/peastman","followers_url":"https://api.github.com/users/peastman/followers","following_url":"https://api.github.com/users/peastman/following{/other_user}","gists_url":"https://api.github.com/users/peastman/gists{/gist_id}","starred_url":"https://api.github.com/users/peastman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peastman/subscriptions","organizations_url":"https://api.github.com/users/peastman/orgs","repos_url":"https://api.github.com/users/peastman/repos","events_url":"https://api.github.com/users/peastman/events{/privacy}","received_events_url":"https://api.github.com/users/peastman/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T16:29:44Z","updated_at":"2015-09-01T16:29:44Z","body":"Thinking about this further, I think it really ought to be treated as a bonded force, not a nonbonded one.  MIC is only appropriate for short range potentials that go to zero at some distance less than half the box size.  Otherwise, the force and energy change discontinuously when it jumps to a different periodic image.  The main use cases of this class are harmonic and flat bottomed harmonic potentials, which grow with distance rather than shrinking."}}