Last active
December 15, 2015 23:29
-
-
Save istitov/5341052 to your computer and use it in GitHub Desktop.
Brute forcing fit of the diffraction pattern with fullprof and shell.
Brute force attack on orthorhombic structure with mmm point symmetry. See details in: http://istitov.wordpress.com/2013/04/09/bruteforcing-spectra-with-fullprof/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#remove fullprof output files | |
rm -v *pcr *hkl *out *sum | |
#looping around orthorhombic crystal system with mmm point group | |
for i in 'Pmmm' 'Pnnn' 'Pccm' 'Pban' 'Pmma' 'Pnna' 'Pmna' 'Pcca' 'Pbam' 'Pccn' 'Pbcm' 'Pnnm' 'Pmmn' 'Pbcn' 'Pbca' 'Pnma' 'Cmcm' 'Cmce' 'Cmmm' 'Cccm' 'Cmme' 'Ccce' 'Fmmm' 'Fddd' 'Immm' 'Ibam' 'Ibca' 'Imma' | |
do | |
#remove output in the loop | |
rm -v *out *sum | |
#put spaces between the characters | |
j=$(echo $i | sed 's/./& /g') | |
#change mygroup in template file to real group name, | |
sed "s/mygroup/$j/" my_spectrum.template > my_spectrum.pcr | |
#run fullprof | |
~/FullProf_Suite/fp2k my_spectrum.pcr | |
#create dir named after the crystallographic group | |
mkdir -v $i | |
#move relevant fullprof output there | |
mv -v *pcr *hkl *prf $i | |
#in some cases (e.g. strong divergence) output is written in a new file. let's have it. | |
mv -v *new $i | |
done | |
#cleanup | |
rm -v *out *sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment