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 ICRMSD.to_csv #18

Merged
merged 4 commits into from
Feb 16, 2024
Merged

Add ICRMSD.to_csv #18

merged 4 commits into from
Feb 16, 2024

Conversation

mattwthompson
Copy link
Member

@mattwthompson mattwthompson commented Feb 16, 2024

The only quirk I intentionally introduced is that the dataframe has NaNs for internal coordinate RMSD types that are not present in the molecule, i.e. a molecule without impropers will be some sort of NaN in memory and an empty column (for that row) in the CSV file

In [1]: from ibstore import MoleculeStore

In [2]: store = MoleculeStore("ibstore/_tests/data/ch.sqlite")

In [3]: store.get_internal_coordinate_rmsd("openff-2.1.0.offxml").to_csv("tmp.cs
   ...: v")

In [4]: !head tmp.csv
,Bond,Angle,Dihedral,Improper
37016993,0.006765353215413105,0.5562185080355656,1.6377223353487484,8.741271028611663e-05
37016854,0.007502142167449161,0.6192872461761049,1.038979039777575,
37016855,0.006833667914207529,0.8319266771498063,1.4919597214037241,
37016856,0.006833011342923914,0.8318419685070038,1.4898176624291597,
37016857,0.0058978815367170135,0.7836030843583247,1.538729375185381,
37016858,0.005898499199221772,0.7837631466083518,1.5462489136810058,
37016859,0.006037055028578897,1.010201068668402,1.161957731826734,
37017102,0.014862708012371406,1.0988051313006353,5.569310966093644e-12,3.4567739785894855e-12
37016810,0.006073102260928175,0.7018525923781802,2.3447115578558857,0.1276783057425198

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2024

Codecov Report

Merging #18 (c70ff42) into main (de80859) will increase coverage by 3.34%.
The diff coverage is 93.61%.

Additional details and impacted files

@mattwthompson mattwthompson marked this pull request as ready for review February 16, 2024 18:05
@mattwthompson mattwthompson merged commit 1891e82 into main Feb 16, 2024
1 check passed
@mattwthompson mattwthompson deleted the icrmsd-csv 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