openbabel / openbabel/openbabel

Wrong space group detection

Open
#263 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.4k
Forks
488
Avg merge
6d 1h
Merged PRs (30d)
1

Description

The issue appears when Hall and HM are the same (in this case A 2), from the space-group.txt:

5
A 2y
A 2,A 1 2 1
x,y,z
-x,y,-z
x,1/2+y,1/2+z
-x,1/2+y,1/2-z

And:

5
A 2
A 1 1 2
x,y,z
-x,-y,z
x,1/2+y,1/2+z
-x,1/2-y,1/2+z

Since, space groups are kept in:
map<string, const SpaceGroup*> sgbn;

And keys for this map (which are unique) are either Hall or HM space group title, one of the above definition is being overwritten.

We could try to move to:

map<string, map<string, const SpaceGroup*> > sgbn;
sgbn["Hall_name"]["HM_name"] = spg;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with space-group.txt and trace where the sgbn map is populated and queried. Reproduce the collision between the A 2y/A 2 definitions, then verify that both Hall and HM names remain addressable without one definition overwriting the other.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.