next up previous contents index
Next: Subroutine get_lattice_params Up: Module atoms_module Previous: Subroutine divide_cell   Contents   Index

Subroutine fit_box_in_cell


\begin{boxedminipage}{\textwidth}
\begin{verbatim}call fit_box_in_cell(rx,ry,rz,lattice, &
Na,Nb,Nc)\end{verbatim}
\end{boxedminipage}

Given an orthogonal box, oriented along the cartesian axes with lengths 2*rx, 2*ry and 2*rz and centred on the origin, what parameters must we pass to supercell to make a system big enough from our original cell defined by lattice for the box to fit inside?

The required supercell parameters are returned in Na, Nb, Nc respectively. If, e.g. Na = 1 then we don't need to supercell in the a direction. Na > 1 means we must supercell by Na times in the $x$ direction.

rx, ry, rz -- real(dp), intent(in)

lattice -- real(dp), dimension(3,3), intent(in)

Na, Nb, Nc -- integer, intent(out)

get_lattice_params subroutine

gabor 2009-06-30