static int get_pointgroup_number(SPGCONST PointSymmetry * pointsym) { int i, j, pg_num, counter; int table[10]; PointgroupType pointgroup_type; debug_print("get_pointgroup_number:"); pg_num = 0; /* Get list of point symmetry operations */ if (! get_pointgroup_class_table(table, pointsym)) { goto end; } for (i = 1; i < 33; i++) { counter = 0; pointgroup_type = pointgroup_data[i]; for (j = 0; j < 10; j++) { if (pointgroup_type.table[j] == table[j]) {counter++;} } if (counter == 10) { pg_num = i; break; } } end: debug_print(" %d\n", pg_num); return pg_num; }
static int get_pointgroup_number( const Symmetry * symmetry ) { int i, j, pg_num, counter; int table[10]; PointgroupType pointgroup_type; /* Get list of rotation part of symmetry operations */ if ( ! get_pointgroup_class_table( table, symmetry ) ) { pg_num = -1; goto end; } pg_num = -1; for ( i = 0; i < 32; i++ ) { counter = 0; pointgroup_type = pointgroup_data[ i ]; for ( j = 0; j < 10; j++ ) { if ( pointgroup_type.table[j] == table[j] ) { counter++; } } if ( counter == 10 ) { pg_num = i; break; } } end: return pg_num; }