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

Feature PDBx/Gemmi #135

Merged
merged 55 commits into from
Dec 13, 2023
Merged

Feature PDBx/Gemmi #135

merged 55 commits into from
Dec 13, 2023

Conversation

chryswoods
Copy link
Contributor

This PR merges in the Gemmi conversion code. This allows interconversion between Gemmi and sire objects. This means we can now read and write PDBx/mmCIF files, including loading and saving custom metadata. The load function has been updated to use PDBx/mmCIF files by default is Gemmi is available, and support for new-style PDB codes is included.

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have added a test for any new functionality in this pull request: [y]
  • I confirm that I have added documentation (e.g. a new tutorial page or detailed guide) for any new functionality in this pull request: [y]
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): [y]
  • I confirm that I have permission to release this code under the GPL3 license: [y]

Suggested reviewers:

@lohedges

Any additional context of information?

This PR includes the changes of feature_optimise_lever so will minimise CI when we accept everything.

This depends on the new Gemmi shared library package being created and uploaded to conda. That package isn't up yet, so some of the CI builds here will fail. You can test locally by building the gemmi conda package locally (the recipe builds the shared-library package). Ideally I'd like to get this code into the 2023.5.0 release as it is self-contained and very useful. If the gemmi package isn't available then we may end up disabling it on unsupported platforms (MacOS, I think) and then enable it for all platforms in 2023.5.1. Like OpenMM, Gemmi is only a runtime dependency - it only needs to be installed if the user wants PDBx/mmCIF support.

(the LJ 12/6/4 code that is mentioned in the first commit was removed in later commit - it is not included at all in this PR)

…IF files. This

is an early stage, and currently only demonstrates that the package can be linked
in and a file parsed.

WIP
…er to fully interoperate

with gemmi rather than hiding it in SireIO/PDBx.

WIP
Have sorted the molecules by their entity type.

WIP
This seems to work well. Now need to back-convert from sire to gemmi.
…ow need

to actually create the gemmi::Structure from the System...
… gemmi

or saving a pdbx file.

Switched sire.load over to use cif for PDB codes if gemmi is supported.

Also added support for the new PDB codes once they are available
(automatically dropping back to the old codes for now)
Added better tests that make sure a PDB and PDBx file give the same
molecule (at least for the protein)

Also check that conversion to and from gemmi gives the same number
of atoms (more complex checks are difficult because of way
chains and subchains are handled)
@chryswoods
Copy link
Contributor Author

Windows build failure is because the current Gemmi conda package has a static library that is built with whole program optimisation. This makes it binary incompatible with VS 2017. See this stackoverflow post:

https://stackoverflow.com/questions/54664134/cannot-compile-unknown-flag-pdbrpc-in-p2

I’ll add a cmake compile Windows that checks for this and disables Gemmi until the dynamic library package is out (similar to how this is disabled in Linux and Mac)

neopentane to methane is correct

[ci skip]
…ad to weird

behaviour (the cutoff was silently ignored)

Now you can set the cutoff using strings, e.g. `cutoff="10 A"` or even
`cutoff="infinite"` or `cutoff="none"`

Added a `map.unset("option")` to unset options from a property map.
@chryswoods chryswoods merged commit bf29443 into devel Dec 13, 2023
@chryswoods chryswoods deleted the feature_format branch December 13, 2023 20:14
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.

1 participant