Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
qbox-public
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
qbox
qbox-public
Commits
25f2f96c
Commit
25f2f96c
authored
Oct 12, 2017
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate xyz file from kpoint file
parent
718452ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
getkpdat.sh
util/kpgen/getkpdat.sh
+10
-1
No files found.
util/kpgen/getkpdat.sh
View file @
25f2f96c
#!/bin/bash
awk
'/kpoint/ {print $3,$4,$5}'
$1
# generate an xyz file from a k-point input file
awk
'/k-points/ { printf("%d\n\n", $2) } \
/b0/ { b0x=$3; b0y=$4; b0z=$5 } \
/b1/ { b1x=$3; b1y=$4; b1z=$5 } \
/b2/ { b2x=$3; b2y=$4; b2z=$5 } \
/kpoint add/ { \
kx=$3*b0x+$4*b1x+$5*b2x; \
ky=$3*b0y+$4*b1y+$5*b2y; \
kz=$3*b0z+$4*b1z+$5*b2z; \
printf("H %10.4f %10.4f %10.4f\n",kx,ky,kz)}'
$1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment