Skip to content

Instantly share code, notes, and snippets.

@istitov istitov/
Last active Dec 15, 2015

What would you like to do?
Brute forcing fit of the diffraction pattern with fullprof and shell. Brute force attack on orthorhombic structure with mmm point symmetry. See details in:
#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'
#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
rm -v *out *sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.