From c85230a897b62f223951f7cc5693c6175e2d673d Mon Sep 17 00:00:00 2001 From: Richard Kirian Date: Tue, 7 Dec 2010 18:42:09 -0700 Subject: added spacegroup to cell info --- src/cell.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/cell.c') diff --git a/src/cell.c b/src/cell.c index 67c49610..fa3cfb0a 100644 --- a/src/cell.c +++ b/src/cell.c @@ -58,7 +58,7 @@ struct _unitcell { double azs; double bzs; double czs; char *pointgroup; - + char *spacegroup; }; @@ -469,6 +469,15 @@ const char *cell_get_pointgroup(UnitCell *cell) } +const char *cell_get_spacegroup(UnitCell *cell) +{ + return cell->spacegroup; +} + + + + + /********************************* Utilities **********************************/ static const char *cell_rep(UnitCell *cell) @@ -877,9 +886,11 @@ UnitCell *load_cell_from_pdb(const char *filename) sym = strndup(line+55, 10); notrail(sym); cell_set_pointgroup_from_pdb(cell, sym); - free(sym); + cell->spacegroup = sym; + } else { cell_set_pointgroup_from_pdb(cell, "P 1"); + cell->spacegroup = strdup("P 1"); ERROR("CRYST1 line without space group.\n"); } } -- cgit v1.2.3