Re: [Spglib-users] weird std_positions based on the fortran interface
Brought to you by:
atztogo
From: Yongsheng Z. <ysh...@ya...> - 2020-12-14 03:53:48
|
Hi Togo, Thanks for your quick reply. The problem is fixed following your suggestions. Cheers,Yongsheng On Monday, December 14, 2020, 9:07:33 AM GMT+8, Atsushi Togo <atz...@gm...> wrote: Hi, It's a bug. Thanks for your report. My fix is found in the develop branch of spglib and exactly here: https://github.com/spglib/spglib/blob/60a384b47e451de09b270fb5197c34c8531b5d02/example/spglib_f08.f90#L605-L607 The following is my test after the fix ## My test Rutile: Standardized crystal cell 4.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 4.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 2.5999999046325684 n_std_atoms 6 std_types 1 1 2 2 2 2 Standardized atomic positions 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.50000000000000000 0.50000000000000000 0.50000000000000000 0.30000001192092896 0.30000001192092896 0.0000000000000000 0.69999998807907104 0.69999998807907104 0.0000000000000000 0.19999998807907104 0.80000001192092896 0.50000000000000000 0.80000001192092896 0.19999998807907104 0.50000000000000000 ## How to compile % mkdir build && cd build % cmake -DCMAKE_INSTALL_PREFIX="" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_VERBOSE_MAKEFILE=1 .. % make DESTDIR=. install % cd ../example ** modify Makefile_f08 like lib = ../build/lib/libsymspg.a ** % make -f Makefile_f08 ... gfortran -g -fcheck=all -fbacktrace -c spglib_f08.f90 gfortran -g -fcheck=all -fbacktrace example_f08.f90 spglib_f08.o ../build/lib/libsymspg.a -o example ... Togo On Sun, Dec 13, 2020 at 11:24 PM Yongsheng Zhang via Spglib-users <spg...@li...> wrote: > > Dear Spglib, > > In the spglib-1.16.0/example, I am trying to get the standardized information of the crystals based on the spglib_f08.f90 and libsymspg.a in the Fortran framework. Then, I added the following lines in the write_syminfo subroutine of the example_f08.f90 file, > > print*, 'Standardized crystal cell' > do i=1,3 > print*, dset%std_lattice(i,:) > end do > print*, > print*, 'n_std_atoms',dset%n_std_atoms > print*, 'std_types',dset%std_types > print*, > print*, 'Standardized atomic positions' > do i=1,num_atom > print*, dset%std_positions(:,i) > end do > > > It turns our that the std_lattice looks good, but the std_positions are weird. For "Rutile": > Standardized crystal cell > 4.0000000000000000 0.0000000000000000 0.0000000000000000 > 0.0000000000000000 4.0000000000000000 0.0000000000000000 > 0.0000000000000000 0.0000000000000000 2.5999999046325684 > > n_std_atoms 6 > std_types 1 1 2 2 2 2 > > Standardized atomic positions > 0.0000000000000000 0.0000000000000000 0.0000000000000000 > 0.0000000000000000 0.0000000000000000 0.0000000000000000 > 0.0000000000000000 1071644672.0000000 0.0000000000000000 > 1071644672.0000000 0.0000000000000000 1071644672.0000000 > 1073741824.0000000 1070805811.0000000 1073741824.0000000 > 1070805811.0000000 0.0000000000000000 0.0000000000000000 > > Would you please let me know to get the correct std_positions? Thank you very much! > Cheers, > Yongsheng > > _______________________________________________ > Spglib-users mailing list > Spg...@li... > https://lists.sourceforge.net/lists/listinfo/spglib-users -- Atsushi Togo _______________________________________________ Spglib-users mailing list Spg...@li... https://lists.sourceforge.net/lists/listinfo/spglib-users |