Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add internal coordinate RMSD method #15

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

mattwthompson
Copy link
Member

Taken from Mobley lab/Pavan/Simon code and vendoring some ForceBalance methods (BSD-3)

https://github.com/MobleyLab/fitting-exp/blob/1bdcadaeeb7cbf48932d26fe9ba502b86da80a5c/benchmark-data/03-a-compute-metrics.py#L76-L147

https://github.com/leeping/forcebalance/blob/b395fd4b3e2c87589475e5d63b94729fc6fdd0c3/src/opt_geo_target.py#L55

Here are results for an uninteresting dataset (bond RMSDs in angstroms and all others in degrees, I think):

In [1]: from ibstore._store import MoleculeStore

In [2]: MoleculeStore("ibstore/_tests/data/ch.sqlite").get_internal_coordinate_rmsd("openff-2.1.0")
Out[2]:
[ICRMSD(qcarchive_id=37016993, force_field='openff-2.1.0', icrmsd={'Bond': 0.006550169831671184, 'Angle': 0.5559583522496603, 'Dihedral': 1.6374273422150705, 'Improper': 8.93723350543496e-05}),
 ICRMSD(qcarchive_id=37016854, force_field='openff-2.1.0', icrmsd={'Bond': 0.007138682451457389, 'Angle': 0.6185942536179675, 'Dihedral': 1.0323512448930943}),
 ICRMSD(qcarchive_id=37016855, force_field='openff-2.1.0', icrmsd={'Bond': 0.006247750103736568, 'Angle': 0.8316009399096257, 'Dihedral': 1.4946436371296377}),
 ICRMSD(qcarchive_id=37016856, force_field='openff-2.1.0', icrmsd={'Bond': 0.006247056246026307, 'Angle': 0.8315164230898707, 'Dihedral': 1.49249201856318}),
 ICRMSD(qcarchive_id=37016857, force_field='openff-2.1.0', icrmsd={'Bond': 0.005435703271716192, 'Angle': 0.7844853675669676, 'Dihedral': 1.53248134180754}),
 ICRMSD(qcarchive_id=37016858, force_field='openff-2.1.0', icrmsd={'Bond': 0.0054364881556377385, 'Angle': 0.7846462695032816, 'Dihedral': 1.5399903466894906}),
 ICRMSD(qcarchive_id=37016859, force_field='openff-2.1.0', icrmsd={'Bond': 0.005540795456894268, 'Angle': 1.0109235162738661, 'Dihedral': 1.1628574000658884}),
 ICRMSD(qcarchive_id=37017102, force_field='openff-2.1.0', icrmsd={'Bond': 0.014820903673051337, 'Angle': 1.0988168781938201, 'Dihedral': 5.388910078145817e-12, 'Improper': 3.3673029318288433e-12}),
 ICRMSD(qcarchive_id=37016810, force_field='openff-2.1.0', icrmsd={'Bond': 0.006079846507812708, 'Angle': 0.7024128239867647, 'Dihedral': 2.356011167656683, 'Improper': 0.12804003731641608}),
 ICRMSD(qcarchive_id=37016811, force_field='openff-2.1.0', icrmsd={'Bond': 0.00608156776340782, 'Angle': 0.7014477164040204, 'Dihedral': 2.3523784808131514, 'Improper': 0.12811600285723404}),
 ICRMSD(qcarchive_id=37017077, force_field='openff-2.1.0', icrmsd={'Bond': 0.01940048837025435, 'Angle': 1.2777272318325552, 'Dihedral': 1.1782636219261775, 'Improper': 4.3160364339637704e-05}),
 ICRMSD(qcarchive_id=37017096, force_field='openff-2.1.0', icrmsd={'Bond': 0.012846171728581445, 'Angle': 0.8856420158568027, 'Dihedral': 0.9863708528923378, 'Improper': 7.706511625722318e-05}),
 ICRMSD(qcarchive_id=37016964, force_field='openff-2.1.0', icrmsd={'Bond': 0.012613938551313807, 'Angle': 0.9462583829009051, 'Dihedral': 0.8689621610277191, 'Improper': 6.4868267968329736e-06}),
 ICRMSD(qcarchive_id=37016448, force_field='openff-2.1.0', icrmsd={'Bond': 0.018433062210820365, 'Angle': 1.0965292852938755, 'Dihedral': 9.829014930396896e-07, 'Improper': 3.971960599125264e-07}),
 ICRMSD(qcarchive_id=37015996, force_field='openff-2.1.0', icrmsd={'Bond': 0.007514682724949229, 'Angle': 0.44884738335053315, 'Dihedral': 24.966252382747346, 'Improper': 0.0024129905711720158}),
 ICRMSD(qcarchive_id=37014804, force_field='openff-2.1.0', icrmsd={'Bond': 0.011899881866847898, 'Angle': 0.9340253416337049, 'Dihedral': 0.19115226944030186, 'Improper': 0.021928537435736646}),
 ICRMSD(qcarchive_id=37011745, force_field='openff-2.1.0', icrmsd={'Bond': 0.006190977258318102, 'Angle': 0.9182612928167914, 'Dihedral': 10.103341781010263, 'Improper': 0.5527994957732563}),
 ICRMSD(qcarchive_id=37011746, force_field='openff-2.1.0', icrmsd={'Bond': 0.006173108445563495, 'Angle': 0.6018950754389091, 'Dihedral': 1.0240500089813809, 'Improper': 0.15162856881589157}),
 ICRMSD(qcarchive_id=37011747, force_field='openff-2.1.0', icrmsd={'Bond': 0.006943579621378736, 'Angle': 0.617148780737558, 'Dihedral': 3.2784329180125265, 'Improper': 0.32747253767749634}),
 ICRMSD(qcarchive_id=37011748, force_field='openff-2.1.0', icrmsd={'Bond': 0.0061698150496715285, 'Angle': 0.6025333618552065, 'Dihedral': 1.027353658664847, 'Improper': 0.15090788575745656}),
 ICRMSD(qcarchive_id=37011749, force_field='openff-2.1.0', icrmsd={'Bond': 0.0069435163627739795, 'Angle': 0.617046426699578, 'Dihedral': 3.2743715589854747, 'Improper': 0.32713432699308304}),
 ICRMSD(qcarchive_id=37015845, force_field='openff-2.1.0', icrmsd={'Bond': 0.006217255281572923, 'Angle': 0.6240019132896458, 'Dihedral': 2.03481607071125, 'Improper': 0.16292620250964854}),
 ICRMSD(qcarchive_id=37015846, force_field='openff-2.1.0', icrmsd={'Bond': 0.006155279061942912, 'Angle': 0.6110941138003414, 'Dihedral': 1.9278426036950957, 'Improper': 0.1261270209213937}),
 ICRMSD(qcarchive_id=37015847, force_field='openff-2.1.0', icrmsd={'Bond': 0.006153333895961751, 'Angle': 0.6106939482286884, 'Dihedral': 1.923918677935856, 'Improper': 0.12651452215612788}),
 ICRMSD(qcarchive_id=37015972, force_field='openff-2.1.0', icrmsd={'Bond': 0.005809055627669946, 'Angle': 0.46464607128052704, 'Dihedral': 1.0958524901436515, 'Improper': 0.2078033918390854}),
 ICRMSD(qcarchive_id=37015973, force_field='openff-2.1.0', icrmsd={'Bond': 0.005805792201251021, 'Angle': 0.46506533856067117, 'Dihedral': 1.1052602517688874, 'Improper': 0.20812565401506103}),
 ICRMSD(qcarchive_id=37011065, force_field='openff-2.1.0', icrmsd={'Bond': 0.009609795809825343, 'Angle': 0.6316290558869438, 'Dihedral': 1.846061994445982, 'Improper': 0.30707260080194787}),
 ICRMSD(qcarchive_id=37011066, force_field='openff-2.1.0', icrmsd={'Bond': 0.00960401268391051, 'Angle': 0.6295074686179206, 'Dihedral': 1.8195759176743669, 'Improper': 0.3060722960032331}),
 ICRMSD(qcarchive_id=37011067, force_field='openff-2.1.0', icrmsd={'Bond': 0.009612434728003574, 'Angle': 0.6307023857054597, 'Dihedral': 1.8411217335554884, 'Improper': 0.30615071850457465}),
 ICRMSD(qcarchive_id=37011068, force_field='openff-2.1.0', icrmsd={'Bond': 0.009603185707925687, 'Angle': 0.6309101136721436, 'Dihedral': 1.846295278825537, 'Improper': 0.31049461585216265}),
 ICRMSD(qcarchive_id=37011069, force_field='openff-2.1.0', icrmsd={'Bond': 0.009611343357758931, 'Angle': 0.6311992985719531, 'Dihedral': 1.8416999056076737, 'Improper': 0.3071041396682353}),
 ICRMSD(qcarchive_id=37011070, force_field='openff-2.1.0', icrmsd={'Bond': 0.009611062593302059, 'Angle': 0.6314452819216084, 'Dihedral': 1.8474941074323479, 'Improper': 0.30668553176580654}),
 ICRMSD(qcarchive_id=37011071, force_field='openff-2.1.0', icrmsd={'Bond': 0.009610035084580916, 'Angle': 0.6313714040892047, 'Dihedral': 1.846227489703665, 'Improper': 0.30662620400502927}),
 ICRMSD(qcarchive_id=37017989, force_field='openff-2.1.0', icrmsd={'Bond': 0.011191403379703296, 'Angle': 0.8245885846815896, 'Dihedral': 1.608054129243075, 'Improper': 0.29414901563572693}),
 ICRMSD(qcarchive_id=37017990, force_field='openff-2.1.0', icrmsd={'Bond': 0.012043438435609306, 'Angle': 1.2212007673675132, 'Dihedral': 31.186632450791755, 'Improper': 0.8276513566048304}),
 ICRMSD(qcarchive_id=37017991, force_field='openff-2.1.0', icrmsd={'Bond': 0.011087255591035523, 'Angle': 0.9628456153084203, 'Dihedral': 3.747626487801523, 'Improper': 0.5334107709850836}),
 ICRMSD(qcarchive_id=37017992, force_field='openff-2.1.0', icrmsd={'Bond': 0.011253331085897843, 'Angle': 0.849346780123082, 'Dihedral': 2.1793198077842466, 'Improper': 0.4346859685350378}),
 ICRMSD(qcarchive_id=37017993, force_field='openff-2.1.0', icrmsd={'Bond': 0.010917677827323105, 'Angle': 0.8987730883050956, 'Dihedral': 3.8398514547878215, 'Improper': 0.2382770882579563}),
 ICRMSD(qcarchive_id=37017994, force_field='openff-2.1.0', icrmsd={'Bond': 0.010978423835093593, 'Angle': 0.8207714060650908, 'Dihedral': 1.7616720976087505, 'Improper': 0.30098550805599256}),
 ICRMSD(qcarchive_id=37017995, force_field='openff-2.1.0', icrmsd={'Bond': 0.010836207320596657, 'Angle': 0.8508384644093593, 'Dihedral': 1.6312441077216813, 'Improper': 0.28119687919575287}),
 ICRMSD(qcarchive_id=37017996, force_field='openff-2.1.0', icrmsd={'Bond': 0.011191481445554628, 'Angle': 0.8254373539811731, 'Dihedral': 1.6117292391054154, 'Improper': 0.29516976093042735}),
 ICRMSD(qcarchive_id=37017997, force_field='openff-2.1.0', icrmsd={'Bond': 0.012157410415253566, 'Angle': 0.8828479039219701, 'Dihedral': 2.2075606253196107, 'Improper': 0.6719542642636422}),
 ICRMSD(qcarchive_id=37017193, force_field='openff-2.1.0', icrmsd={'Bond': 0.00711573587534465, 'Angle': 1.5617585684726505, 'Dihedral': 35.94736360226559, 'Improper': 0.9356585166402819}),
 ICRMSD(qcarchive_id=37017194, force_field='openff-2.1.0', icrmsd={'Bond': 0.007121045104862379, 'Angle': 1.5605520925865022, 'Dihedral': 35.32673359291271, 'Improper': 0.9772966150400502}),
 ICRMSD(qcarchive_id=37017195, force_field='openff-2.1.0', icrmsd={'Bond': 0.006358804750817966, 'Angle': 0.6132876154437907, 'Dihedral': 2.8210879598683833, 'Improper': 0.4505329676500622}),
 ICRMSD(qcarchive_id=37017196, force_field='openff-2.1.0', icrmsd={'Bond': 0.0063642210187716125, 'Angle': 0.7027676247022633, 'Dihedral': 1.749736307458135, 'Improper': 0.5664961780642402}),
 ICRMSD(qcarchive_id=37017197, force_field='openff-2.1.0', icrmsd={'Bond': 0.006488685742096998, 'Angle': 0.5817380145151422, 'Dihedral': 2.7716055273064244, 'Improper': 0.437792279299882}),
 ICRMSD(qcarchive_id=37017198, force_field='openff-2.1.0', icrmsd={'Bond': 0.0064252259891448196, 'Angle': 0.7245807928827694, 'Dihedral': 1.8208337164659485, 'Improper': 0.5913628727765142}),
 ICRMSD(qcarchive_id=37017199, force_field='openff-2.1.0', icrmsd={'Bond': 0.006488582161203712, 'Angle': 0.5798924290487026, 'Dihedral': 2.759862275892878, 'Improper': 0.44032563055343893}),
 ICRMSD(qcarchive_id=37017200, force_field='openff-2.1.0', icrmsd={'Bond': 0.006375184831694878, 'Angle': 0.712092770921249, 'Dihedral': 1.738512315027168, 'Improper': 0.5964716223036298}),
 ICRMSD(qcarchive_id=37017201, force_field='openff-2.1.0', icrmsd={'Bond': 0.0064894576797695745, 'Angle': 0.5809632435204277, 'Dihedral': 2.759958046289572, 'Improper': 0.4406766953356759}),
 ICRMSD(qcarchive_id=37017202, force_field='openff-2.1.0', icrmsd={'Bond': 0.006364496849641764, 'Angle': 0.7028224807872366, 'Dihedral': 1.7690104970000293, 'Improper': 0.5712782057604647}),
 ICRMSD(qcarchive_id=37016945, force_field='openff-2.1.0', icrmsd={'Bond': 0.016807402829255778, 'Angle': 0.6236138869306248}),
 ICRMSD(qcarchive_id=37016823, force_field='openff-2.1.0', icrmsd={'Bond': 0.009921750500824486, 'Angle': 0.42221792889353293, 'Dihedral': 0.3123711768125151}),
 ICRMSD(qcarchive_id=37016960, force_field='openff-2.1.0', icrmsd={'Bond': 0.005239794175551397, 'Angle': 0.9312424431115145, 'Dihedral': 0.8663782960832754}),
 ICRMSD(qcarchive_id=37016576, force_field='openff-2.1.0', icrmsd={'Bond': 0.006127684940224838, 'Angle': 1.069858986714916, 'Dihedral': 1.2311217719950498}),
 ICRMSD(qcarchive_id=37016577, force_field='openff-2.1.0', icrmsd={'Bond': 0.006345538486537891, 'Angle': 0.7596300178614366, 'Dihedral': 1.3663361038134965}),
 ICRMSD(qcarchive_id=37017088, force_field='openff-2.1.0', icrmsd={'Bond': 0.005794873114082572, 'Angle': 0.6822358815592469, 'Dihedral': 1.2079561149010747}),
 ICRMSD(qcarchive_id=37016286, force_field='openff-2.1.0', icrmsd={'Bond': 0.01720312857548634, 'Angle': 1.8095241119366652, 'Dihedral': 0.007542498342778538, 'Improper': 0.004649653450364366}),
 ICRMSD(qcarchive_id=37016943, force_field='openff-2.1.0', icrmsd={'Bond': 0.01920153256920587, 'Angle': 1.6546829652110688, 'Dihedral': 17.264892479005816, 'Improper': 0.7059367723401485}),
 ICRMSD(qcarchive_id=37016944, force_field='openff-2.1.0', icrmsd={'Bond': 0.017463724545620837, 'Angle': 2.297557718229009, 'Dihedral': 9.379325003338713e-05, 'Improper': 1.4444473533495348e-05}),
 ICRMSD(qcarchive_id=37016887, force_field='openff-2.1.0', icrmsd={'Bond': 0.00606723625160349, 'Angle': 1.3393794699724972, 'Dihedral': 2.05630129839336}),
 ICRMSD(qcarchive_id=37016888, force_field='openff-2.1.0', icrmsd={'Bond': 0.006048446389533027, 'Angle': 1.3392355485344116, 'Dihedral': 1.8135692280923126}),
 ICRMSD(qcarchive_id=37016980, force_field='openff-2.1.0', icrmsd={'Bond': 0.008085979069017854, 'Angle': 1.1285590256768379, 'Dihedral': 2.517256119682579}),
 ICRMSD(qcarchive_id=37017122, force_field='openff-2.1.0', icrmsd={'Bond': 0.017432660703675773, 'Angle': 1.117290425909826, 'Dihedral': 10.345600731266309, 'Improper': 0.7112728201155392}),
 ICRMSD(qcarchive_id=37017082, force_field='openff-2.1.0', icrmsd={'Bond': 0.005261135191330036, 'Angle': 0.42170120939773087, 'Dihedral': 0.007251807719165297}),
 ICRMSD(qcarchive_id=37017071, force_field='openff-2.1.0', icrmsd={'Bond': 0.008469533632642216, 'Angle': 1.3987812135704456, 'Dihedral': 1.6299778182201603}),
 ICRMSD(qcarchive_id=37016444, force_field='openff-2.1.0', icrmsd={'Bond': 0.005500621599040299, 'Angle': 0.6762487910372597, 'Dihedral': 2.608942994804485}),
 ICRMSD(qcarchive_id=37016445, force_field='openff-2.1.0', icrmsd={'Bond': 0.005067700879666465, 'Angle': 0.8575079178968394, 'Dihedral': 1.108383618538452}),
 ICRMSD(qcarchive_id=37016446, force_field='openff-2.1.0', icrmsd={'Bond': 0.005498617373013298, 'Angle': 0.6753973120019785, 'Dihedral': 2.5942295991336914}),
 ICRMSD(qcarchive_id=37017100, force_field='openff-2.1.0', icrmsd={'Bond': 0.006178226080937493, 'Angle': 0.5130634539955289, 'Dihedral': 0.7782623472227669}),
 ICRMSD(qcarchive_id=37017079, force_field='openff-2.1.0', icrmsd={'Bond': 0.006717993029008152, 'Angle': 0.8342454321046748, 'Dihedral': 1.5623671853989916}),
 ICRMSD(qcarchive_id=37017080, force_field='openff-2.1.0', icrmsd={'Bond': 0.007095252578535612, 'Angle': 1.20701638547485, 'Dihedral': 2.8111120485027588}),
 ICRMSD(qcarchive_id=37016447, force_field='openff-2.1.0', icrmsd={'Bond': 0.005194933107394603, 'Angle': 0.02072073095295987, 'Dihedral': 5.40915795796043e-12, 'Improper': 2.46368846692e-12}),
 ICRMSD(qcarchive_id=37016955, force_field='openff-2.1.0', icrmsd={'Bond': 0.004868214296353548, 'Angle': 0.7372249169085996, 'Dihedral': 1.30948792564486, 'Improper': 0.9424093803094138}),
 ICRMSD(qcarchive_id=37017123, force_field='openff-2.1.0', icrmsd={'Bond': 0.004682692675755104, 'Angle': 0.716750937894238, 'Dihedral': 0.7543036631124536, 'Improper': 0.11572728565346324}),
 ICRMSD(qcarchive_id=37017112, force_field='openff-2.1.0', icrmsd={'Bond': 0.0054118150794234205, 'Angle': 0.9257980045717107, 'Dihedral': 1.303125282187246, 'Improper': 0.8749577710314818}),
 ICRMSD(qcarchive_id=37016882, force_field='openff-2.1.0', icrmsd={'Bond': 0.005122520581918264, 'Angle': 0.8640496077148012, 'Dihedral': 1.7149985880505387, 'Improper': 0.8139306650995839}),
 ICRMSD(qcarchive_id=37016956, force_field='openff-2.1.0', icrmsd={'Bond': 0.00623979474348782, 'Angle': 0.9027558570005847, 'Dihedral': 1.1610893810489997, 'Improper': 0.0008994293700368416}),
 ICRMSD(qcarchive_id=37017090, force_field='openff-2.1.0', icrmsd={'Bond': 0.006667676351087947, 'Angle': 0.949760411729881, 'Dihedral': 1.1843721753172716, 'Improper': 0.3065054654219836}),
 ICRMSD(qcarchive_id=37017037, force_field='openff-2.1.0', icrmsd={'Bond': 0.005407246199862627, 'Angle': 0.6838494395289564, 'Dihedral': 1.1923884536548768, 'Improper': 0.0001617266152322827}),
 ICRMSD(qcarchive_id=37017014, force_field='openff-2.1.0', icrmsd={'Bond': 0.003091468453146329, 'Angle': 0.00043980148467598687})]

@codecov-commenter
Copy link

Codecov Report

Merging #15 (60b25c0) into main (0d3bbe8) will decrease coverage by 3.50%.
The diff coverage is 13.33%.

Additional details and impacted files

@mattwthompson mattwthompson marked this pull request as ready for review January 25, 2024 17:38
@mattwthompson mattwthompson merged commit de80859 into main Jan 25, 2024
1 check passed
mattwthompson added a commit that referenced this pull request Feb 16, 2024
@mattwthompson mattwthompson deleted the add-internal-coordinate-rmsds branch November 25, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants