Skip to content

Commit

Permalink
Changed how anomalous space groups are checked and removed unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
hlasimpk committed May 3, 2017
1 parent fcbea82 commit e5fab01
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions simbad/lattice/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import Bio.PDB
import cctbx.crystal
import cctbx.uctbx
import cPickle
import gzip
import logging
import numpy
Expand Down Expand Up @@ -147,16 +146,13 @@ def space_group(self):
def space_group(self, space_group):
"""Define the space group"""
# Check for known anomalies, may need to add to this
if space_group == "B2":
space_group = "B112"
elif space_group == "C1211":
space_group = "C2"
elif space_group == "P21212A":
space_group = "P212121"
elif space_group == "R3":
space_group = "R3:R"
elif space_group == "C4212":
space_group = "P422"
sg_conversion = {
'A1': 'P1', 'B2': 'B112', 'C1211': 'C2', 'F422': 'I422',
'I21': 'I2', 'I1211': 'I2', 'P21212A': 'P212121',
'R3': 'R3:R', 'C4212': 'P422',
}

space_group = sg_conversion.get(space_group, space_group)
self._space_group = space_group
self._search_results = None

Expand Down

0 comments on commit e5fab01

Please sign in to comment.