-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Allow to set space group origin in PDB CRYST1 section #1558
Conversation
This is fixed by removed overloaded version of SpaceGroup::SetHMName. Unrelated, removed similar overloaded SpaceGroup::SetHallName.
Pinging @jbrefort, it seems he added the code that I'm trying to remove. |
NVM, after looking closely, I think all the functionality of that commit is preserved, so good for review. |
New tests run and pass:
|
Added tests. |
I've been testing this version for loading CIF files and converting them to PDB, seems to work well. |
PDB format allows 11 characters in the space group name. Added test.
Can anyone review and merge this please? |
Hi Alexandr, I've been a bit confused by all of the commits. Getting pull requests is great, but the usual development process is to push to your own branch and only once it's ready to submit a pull request. Otherwise all of the developers get emails for every commit, and don't know when it's finished. Anyway, back to the topic on hand. I'm not really familiar with the crystal code. Can you provide a short description of what problem or feature this pull request solves/adds and how it does it |
Hi Noel,
I apologize for that. It was a combination of self-review and improvements.
|
No worries. Sounds good, except for point 2. Functions should always take const char* instead of std::string (or reference to). I plan to remove all duplicate functions in the near future. I'm not sure from your description if you are saying you need the std::string version for some reason...? Feel free to point me to the code. |
There were two overloaded variants of SetHallName (spacegroup.h):
and (removed in this pull request):
For SetHMName:
and (removed in this pull request):
In the SetHMName(const std::string &name) variant, origin was parsed and set, whereas in SetHMName(const char *name) it wasn't.
I don't have any issues removing either of the signatures, as long as parsing origin is kept. |
A nice example of why we should avoid duplicate functions. Could you change the signature to take const char and then it's good to merge. |
All done, related tests run and pass:
|
Thanks. |
First part is to always parse space group origin:
Second part:
Added tests.