-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix issues #296, #297, and #298 #299
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chryswoods
approved these changes
Feb 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good :-)
lohedges
added a commit
that referenced
this pull request
Feb 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR closes #296 by setting and SDF tags as properties of the RDKit molecule during conversion. (The SDF metada is stored internally in Sire as a
sdf_data
property on molecule.) On conversion back to Sire, all non-internal properties of a RDKit molecule are now stored as anrdkit_data
property. We can't write back tosdf_data
, since the RDKit molecule doesn't tag where the properties come from, e.g. were they set when loading from SDF, or otherwise, so there is no clean separation of what data came from where. A user could allow these tags to be used when writing to SDF by using the property map, e.g. by remappingsdf_data
tordkit_data
. In any case, the main use case here is the ability to convert an SDF molecule to RDKit, then later write to SDF using RDKit and retain all of the tags in the original file, which this does.The PR also closes #297 by setting the
MolName
of any molecule loaded from SDF to the name in that file. Currently it takes a default molecule name ofMOL
. There is also aname
molecular property that is set, but CI failures made me realise that this can also be used for other information, e..g. theneopentane-methane
merged system appeared to have some kind of atom selection as thename
property.The PR also closes #298 by adding special handling for velocity records when the number of atoms in an AMBER RST7 file is 2 or less. If so, then the velocity line could be blank if no data is present. (There is a check to see how many lines should be exist if velocities are present, which this passes, but the line contains no data.) I'm not sure what parser is adding a blank line at the end, but it is part of the Exs pipeline.
devel
into this branch before issuing this pull request (e.g. by runninggit pull origin devel
): [y]