2 * create lattice (for usage in vasp POSCAR file)
4 * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
12 #include "../math/math.h"
16 #define ZINCBLENDE 0x03
18 int main(int argc,char **argv) {
28 printf("usage: %s type lx ly lz\n",argv[0]);
43 memset(basis,0,3*sizeof(t_3dvec));
53 for(i=0;i<atoi(argv[2]);i++) {
55 for(j=0;j<atoi(argv[3]);j++) {
57 for(k=0;k<atoi(argv[4]);k++) {
60 printf(" %.2f %.2f %.2f T T T\n",r.x,r.y,r.z);
62 // face centered atoms
64 v3_add(&n,&r,&(basis[l]));
65 printf(" %.2f %.2f %.2f T T T\n",n.x,n.y,n.z);
80 for(i=0;i<atoi(argv[2]);i++) {
82 for(j=0;j<atoi(argv[3]);j++) {
84 for(k=0;k<atoi(argv[4]);k++) {
87 printf(" %.2f %.2f %.2f T T T\n",r.x+0.25,r.y+0.25,r.z+0.25);
89 // face centered atoms
91 v3_add(&n,&r,&(basis[l]));
92 printf(" %.2f %.2f %.2f T T T\n",n.x+0.25,n.y+0.25,n.z+0.25);
106 printf("\ntotal: %d ions\n\n",cnt);