diff options
-rw-r--r-- | libcrystfel/src/cell-utils.c | 5 | ||||
-rw-r--r-- | libcrystfel/src/mosflm.c | 14 |
2 files changed, 15 insertions, 4 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index c30d9a03..ca697391 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -378,7 +378,6 @@ UnitCell *match_cell(UnitCell *cell, UnitCell *template, int verbose, } - UnitCell *match_cell_ab(UnitCell *cell, UnitCell *template) { double ax, ay, az; @@ -692,6 +691,10 @@ UnitCell *load_cell_from_pdb(const char *filename) fclose(fh); /* FIXME: Turn "H" centered cells into "R" cells */ + if ( cell_get_centering(cell) == 'H' ) { + STATUS("Turning your H-centered (PDB convention) cell into" + " an R-centered one.\n"); + } validate_cell(cell); diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index a2d8520e..e81f20b6 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -276,6 +276,8 @@ static const char *spacegroup_for_lattice(UnitCell *cell) { LatticeType latt; char centering; + char *g = NULL; + char *result; latt = cell_get_lattice_type(cell); centering = cell_get_centering(cell); @@ -291,7 +293,7 @@ static const char *spacegroup_for_lattice(UnitCell *cell) break; case L_ORTHORHOMBIC : - g = "222"; + g = "2 2 2"; break; case L_TETRAGONAL : @@ -307,11 +309,17 @@ static const char *spacegroup_for_lattice(UnitCell *cell) break; case L_CUBIC : - g = "23"; + g = "2 3"; break; + } + assert(g != NULL); + + result = malloc(32); + if ( result == NULL ) return NULL; + snprintf(result, 31, "%c %s", centering, g); - return "P1"; + return result; } |