[Spglib-users] spglib and cubic silicon
Brought to you by:
atztogo
From: SAYEDE A. <say...@ho...> - 2014-11-10 14:22:09
|
Dear spglib devlopper and users, I wanted a clarification on the use of spglib in the case of cubic silicon, I want to find the primitive cell of the following structure Lattice:4.000000 0.000000 0.0000000.000000 4.000000 0.0000000.000000 0.000000 4.000000 Positions :0.000000 0.000000 0.0000000.250000 0.750000 0.7500000.000000 0.500000 0.5000000.250000 0.250000 0.2500000.500000 0.000000 0.5000000.750000 0.750000 0.2500000.500000 0.500000 0.0000000.750000 0.250000 0.750000 spg_find_primitive give me : Lattice:2.000000 -2.000000 2.000000-2.000000 -0.000000 2.0000000.000000 -2.000000 0.000000 Positions :0.000000 0.000000 0.000000-0.250000 -0.500000 0.250000 When I use the obtained structure spg_get_dataset indicate that structure has Cm (8) symmetry !! The code : #######################################################################################include "spglib.h"#include <stdio.h> int main(){ double lattice[3][3] = { {4, 0, 0}, {0, 4, 0}, {0, 0, 4} }; double positions[32][3]; double pos_orig[][3] = { {0, 0, 0}, {0.0, 0.5, 0.5}, {0.5, 0.5, 0.0}, {0.5, 0.0, 0.5}, {0.75, 0.25, 0.75}, {0.25, 0.25, 0.25}, {0.25, 0.75, 0.75}, {0.75, 0.75, 0.25} }; int types[32]; int i, num_atom = 8, num_atom_prim, num_atom_bravais; double symprec = 1e-5; for (i = 0; i < num_atom; i++) { positions[i][0] = pos_orig[i][0]; positions[i][1] = pos_orig[i][1]; positions[i][2] = pos_orig[i][2]; types[i] = 1; } num_atom_bravais = spg_refine_cell(lattice, positions, types, num_atom, symprec); num_atom_prim = spg_find_primitive(lattice, positions, types,num_atom_bravais, symprec); for (i = 0; i < 3; i++) { printf("%f %f %f\n", lattice[i][0], lattice[i][1], lattice[i][2]); } for (i = 0; i < num_atom_prim; i++) { printf("%f %f %f\n", positions[i][0], positions[i][1], positions[i][2]); } SpglibDataset *dataset;const char *wl = "abcdefghijklmnopqrstuvwxyz";char symbol[11];spg_get_schoenflies(symbol, lattice, positions, types, num_atom, 1e-5);dataset = spg_get_dataset(lattice, positions, types, num_atom, 1e-5); printf("International: %s (%d)\n", dataset->international_symbol, dataset->spacegroup_number );printf("Hall symbol: %s\n", dataset->hall_symbol );printf("Number o f symmetry operations: %d\n", dataset->n_operations);}######################################################################################Can someone tell me what going wrong ? Thank you in advance ,Adlane |