{"action":"reopened","issue":{"url":"https://api.github.com/repos/choderalab/openmm-constph/issues/16","repository_url":"https://api.github.com/repos/choderalab/openmm-constph","labels_url":"https://api.github.com/repos/choderalab/openmm-constph/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/choderalab/openmm-constph/issues/16/comments","events_url":"https://api.github.com/repos/choderalab/openmm-constph/issues/16/events","html_url":"https://github.com/choderalab/openmm-constph/issues/16","id":122151853,"number":16,"title":"Implementing inherent-pKa biases","user":{"login":"bas-rustenburg","id":3977731,"avatar_url":"https://avatars.githubusercontent.com/u/3977731?v=3","gravatar_id":"","url":"https://api.github.com/users/bas-rustenburg","html_url":"https://github.com/bas-rustenburg","followers_url":"https://api.github.com/users/bas-rustenburg/followers","following_url":"https://api.github.com/users/bas-rustenburg/following{/other_user}","gists_url":"https://api.github.com/users/bas-rustenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/bas-rustenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bas-rustenburg/subscriptions","organizations_url":"https://api.github.com/users/bas-rustenburg/orgs","repos_url":"https://api.github.com/users/bas-rustenburg/repos","events_url":"https://api.github.com/users/bas-rustenburg/events{/privacy}","received_events_url":"https://api.github.com/users/bas-rustenburg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-14T22:59:40Z","updated_at":"2016-05-02T20:37:07Z","closed_at":null,"body":"I had a few thoughts on implementing the two-step method from the Chen&Roux paper. (doi: 10.1021/acs.jctc.5b00261), and I just wanted to leave those here to make sure I am interpreting things correctly, as well as discuss details of the implementation.\r\n\r\nEquation 25 (here below) is defined for a single transition, for one residue:\r\n![image](https://cloud.githubusercontent.com/assets/3977731/11795867/1b68ab42-a287-11e5-81f4-75964304c97f.png)\r\n\r\n### Implementation plan\r\n* Randomly pick a residue from all titratable residues\r\n* Randomly pick a physically accessible state (since it needs to have a pKa).\r\n\r\n* Accept/reject with probability given by eq. 25.\r\n\r\nIf accepted:\r\n\r\nCompute the probability of accepting the new parameters using _compute_log_probability like we do currently.\r\n\r\nBecause of the pKa bias, we have higher chance of these being accepted.\r\n\r\nIf rejected:\r\n\r\nTry again, but we won't need to calculate the expensive second part, so we can increase the number of trials.\r\n\r\n### Changes required to other parts of the code:\r\n\r\n* We need an equilibrium constant for pairs of states, not single states (pKa), which likely means that it needs to be a physical process. \r\n\r\nEven for proteins we would need to adapt our code because residues have more than one state (e.g. ASP has 5), and we need to define which transitions are valid, and what the pKa is. \r\n\r\n* We'd need to encode the sign of the transition (λ' - λ). \r\n \r\nSome questions/issues:\r\n\r\n* Our old solution would work for tautomers, but using this, we'd have to come up with a separate expression to update tautomers (use the old method?).\r\n\r\n* Would we allow picking a transition to the current state (old state = new state)? (always accept?)\r\n\r\n* For states that always should be accepted (equally probable tautomers of ASP), set pKa = pH (kind of a hack)? \r\n\r\n\r\n"}}