{"action":"created","issue":{"url":"https://api.github.com/repos/open-forcefield-group/smarty/issues/132","repository_url":"https://api.github.com/repos/open-forcefield-group/smarty","labels_url":"https://api.github.com/repos/open-forcefield-group/smarty/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/open-forcefield-group/smarty/issues/132/comments","events_url":"https://api.github.com/repos/open-forcefield-group/smarty/issues/132/events","html_url":"https://github.com/open-forcefield-group/smarty/issues/132","id":174792543,"number":132,"title":"Build in infrastructure for off-center charges before proceeding to parameterization","user":{"login":"davidlmobley","id":7132257,"avatar_url":"https://avatars.githubusercontent.com/u/7132257?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlmobley","html_url":"https://github.com/davidlmobley","followers_url":"https://api.github.com/users/davidlmobley/followers","following_url":"https://api.github.com/users/davidlmobley/following{/other_user}","gists_url":"https://api.github.com/users/davidlmobley/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlmobley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlmobley/subscriptions","organizations_url":"https://api.github.com/users/davidlmobley/orgs","repos_url":"https://api.github.com/users/davidlmobley/repos","events_url":"https://api.github.com/users/davidlmobley/events{/privacy}","received_events_url":"https://api.github.com/users/davidlmobley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/open-forcefield-group/smarty/labels/design%20choice","name":"design choice","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-09-02T15:57:30Z","updated_at":"2016-10-06T18:36:24Z","closed_at":null,"body":"Christopher Bayly and I have been thinking that perhaps we should, at this stage, build in the infrastructure for off-center charges (\"lone pair\", sigma hole) into the SMIRFF format before we get to parameterizing to actual data so that we don't have to re-do as much later when we need them. (For example, someone will need to do a new set of BCCs in the near future; it would save time if we could do two sets at the same time, one \"normal\" set of BCCs, and one set for \"BCCs when off-center charges are included\".)\r\n\r\nThere are three cases where we expect to need off-center charges, and one where it will be worth finding out (of course, others may also crop up):\r\n- chlorine (sigma hole); this effect was essentially already characterized by us in a SAMPL challenge and yes, we really do need off-center charges\r\n- nitrogen -- especially divalent sp2 nitrogen (pyridine-type) and maybe some sp3 nitrogen (urea, sulfonamide)\r\n- other halogens -- trifluoroethylamines and others\r\n- possibly carbonyl, but Schrodinger apparently told Christopher that they checked to see if these were needed there and found the answer was no. We will probably want to also check.\r\n\r\nA key question, @jchodera , is *what's needed to implement these*? There are two key aspects of this:\r\n1. How do we add off-center charges? i.e. does OpenMM support virtual sites, and how do we do it?\r\n2. The lone-pair/off-center charges have to be included in their atom's interactions for the purposes of exclusions and 1-4s, so it's not enough just to have a virtual site but there has to be proper accounting of its interactions. How do we do that?\r\n\r\nAnyway, it would be great to have your thoughts on how much work this would be to implement and what the most straightforward way is to do it.\r\n\r\nOne thought driving this is that if we get all of the \"major changes in worldview\" we need in to SMIRFF right at the very beginning, it will simplify everything a lot in the future AND help us demonstrate how this approach is dramatically different/better. These include a lot that we already have in or will have in shortly including:\r\n- fragment-based chemical perception rather than atom typing\r\n- chemical perception which is different for the different force terms\r\n- partial bond orders\r\netc.\r\n\r\nThese things all share the common feature that they reduce the effective number of parameters required in the force field. The same thing should be true for off-center charges as well, we believe. Christopher has several examples where the LACK of off-center charges required adding additional parameters to the force field (atom types and BCCs) to compensate. "},"comment":{"url":"https://api.github.com/repos/open-forcefield-group/smarty/issues/comments/252050844","html_url":"https://github.com/open-forcefield-group/smarty/issues/132#issuecomment-252050844","issue_url":"https://api.github.com/repos/open-forcefield-group/smarty/issues/132","id":252050844,"user":{"login":"davidlmobley","id":7132257,"avatar_url":"https://avatars.githubusercontent.com/u/7132257?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlmobley","html_url":"https://github.com/davidlmobley","followers_url":"https://api.github.com/users/davidlmobley/followers","following_url":"https://api.github.com/users/davidlmobley/following{/other_user}","gists_url":"https://api.github.com/users/davidlmobley/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlmobley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlmobley/subscriptions","organizations_url":"https://api.github.com/users/davidlmobley/orgs","repos_url":"https://api.github.com/users/davidlmobley/repos","events_url":"https://api.github.com/users/davidlmobley/events{/privacy}","received_events_url":"https://api.github.com/users/davidlmobley/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T18:36:23Z","updated_at":"2016-10-06T18:36:23Z","body":"OK, so let's move to try and finalize this virtual sites issue -- it would be very nice to have the framework for this in place for the SMIRFF format paper so we at least have basically everything implemented that we will need for the format. \r\n\r\n**First, what we want to cover, in approximate priority order**:\r\n1. Chlorine (and general halogen) sigma hole: Virtual site at a fixed distance outside the Cl atom along the same vector as the X-Cl bond.\r\n2. Divalent sp2 nitrogen such as in pyridine: Single charge site at a fixed distance from the nitrogen, bisecting the angle left by subtraction of the X~N~Y angle (i.e. if that angle is 118 degrees, it will bisect the remaining 242 degrees)\r\n3. Carbonyl lone pair: Charges in the plane of the carbonyl, at specified angles relative to the carbonyl's connected atoms, at specified distances from the oxygen (i.e. one searches along the specified angle and places the charge at the specified distance from the oxygen)\r\n4. Trivalent sp3 nitrogen (tetrahedral or planar): Charges (of specified values which may be nonequal) lie above and below the nitrogen at a specified distance from the nitrogen along a line perpendicular to the plane defined by the atoms connected to the nitrogen. (For example, for a planar nitrogen of this type the charges will be equal, whereas for a tetrahedral one (with the other atoms below the nitrogen) only the charge above the nitrogen will be nonzero; for geometries in between tetrahedral and planar the charges will vary between these two extremes).\r\n\r\n**On the XML specs, here's what I think will work**, jumping off from your last proposal:\r\n```XML\r\n<!-- sigma hole for halogens: \"distance\" denotes distance along the 2->1 bond vector -->\r\n<VirtualSite type=\"BondCharge\" smirks=\"[Cl:1]-[C:2]\" distance=\"0.30\"/>\r\n<!-- monovalent lone pairs: carbonyl -->\r\n<!-- inPlaneAngle is angle charge site (X) makes with 1 and 2, i.e. X-1-2 -->\r\n<!-- outOfPlaneAngle is angle charge site (X) makes out of the plane of 2-1-3 measured from 1 -->\r\n<VirtualSite type=\"BondCharge\" smirks=\"[O:1]=[C:2]-[*:3]\" distance=\"0.30\" outOfPlaneAngle=\"0\" inPlaneAngle=\"120\"/>\r\n<!-- divalent lone pair: pyrimidine -->\r\n<!-- single charge site lies in plane, bisecting the angle left by taking 360 degrees minus angle(2,1,3) -->\r\n<VirtualSite type=\"DivalentLonePair\" smirks=\"\"[*:2]~[#7X2:1]~[*:3]\" distance=\"0.30\"/>\r\n<!-- trivalent nitrogen lone pair -->\r\n<!-- charge sites lie above and below the nitrogen at specified distances from the nitrogen, along the vector perpendicular to the plane of (2,3,4) that passes through the nitrogen. If the nitrogen is co-planar with the connected atom, charge sites are simply above and below the plane-->\r\n<!-- Positive and negative values refer to above or below the nitrogen as measured relative to the plane of (2,3,4), i.e. below the nitrogen means nearer the 2,3,4 plane unless they are co-planar -->\r\n<VirtualSite type=\"TrivalentLonePair\" smirks=\"[*:2]~[#7X3:1](~[*:4])~[*:3]\" distance=\"0.30\"/>\r\n<VirtualSite type=\"TrivalentLonePair\" smirks=\"[*:2]~[#7X3:1](~[*:4])~[*:3]\" distance=\"-0.30\"/>\r\n```\r\n\r\nPresumably the value of the charge on the virtual site(s) would be handled by the charging procedure.\r\n\r\n**Cases and comments on the above XML**:\r\n1. Sigma hole: Handled by `BondCharge`, straightforward. Single charge site.\r\n2. Divalent SP2 nitrogen in pyrimidine: Handled by DivalentLonePair as above; straightforward. Charge lies in the plane of the other atoms, bisecting angle remaining when taking (360 - angle(2,1,3)). Single charge site.\r\n3. Carbonyl lone pair: Handled by `BondCharge`. We do not use the `outOfPlaneAngle` with `BondCharge` currently, but it is allowed for generality/possible future use cases. Two charge sites are created because of the symmetry of the SMIRKS.\r\n4. Trivalent nitrogen lone pair: The most complex case but the comments above I think handle it. The one thing I'm not sure of is whether we actually want to define two sites in the XML or just define one but have two get created (since they are always created symmetrically, though the charges may not be equal). I actually think it is probably better only to define one, as the sign of the distance becomes ambiguous when the atoms are co-planar, which would make it confusing for the user. Two charge sites must be created.\r\n\r\n@jchodera, is that enough for you to get going on how to implement?\r\n"}}
{"actor":{"display_login":"davidlmobley"}}