Skip to content

Instantly share code, notes, and snippets.

@istitov
istitov / L21_cell.asy
Last active December 29, 2015 07:09
Picture of bcc unit cell written in asymptote language. 'asy L21_cell.asy -f png' will produce png out of it. For http://wp.me/p2FT07-x
settings.maxtile = (0,0);
if(settings.render < 0) settings.render = 10;
settings.antialias=1;
import three;
size(250,0);
currentprojection=perspective(250,-1000,250,center=true);
//L21 lattice.
//define two types of ions
\begin{tikzpicture}
\begin{groupplot}[group style={columns=2,rows=2},]
\nextgroupplot[axis y line*=left,axis x line*=bottom,] % 1
\addplot[blue] coordinates {(0,2) (2,0)};
\nextgroupplot[axis y line*=left,axis x line*=bottom,] % 2
\addplot[blue] coordinates {(0,0) (3,3)};
\nextgroupplot[at=(group c1r1.north),axis y line*=right,axis x line*=top,] % 1, 2nd axis
\addplot[red] coordinates {(0,0) (2,3)};
\nextgroupplot[at=(group c2r1.north),axis y line*=right,axis x line*=top] % 2, 2nd axis
\addplot[red] coordinates {(0,3) (4,0)};
@istitov
istitov / brute_prof.sh
Last active December 15, 2015 23:29
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/
#!/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')
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0,0) circle (0.4cm);
\end{tikzpicture}
\end{document}