digraph ls_scf { splines="ortho"; start [shape=ellipse, label="ls_scf()", width=1]; node [shape=box, width=4]; do_init [label="CALL ls_scf_init_scf()", URL="http://cp2k.org/code:ls_scf_initial_guess"]; start -> do_init; do_qs_to_ls[label="CALL matrix_qs_to_ls()"] do_init -> do_qs_to_ls; { rank=same; if_precon_ks [shape=diamond, label="S_PRECONDITIONER?", URL="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LS_SCF.html#list_S_PRECONDITIONER"]; do_precon_ks [label="Precondition KS-matrix", width=3]; if_precon_ks -> do_precon_ks [taillabel="yes", minlen=1.5]; } do_qs_to_ls -> if_precon_ks; do_filter_ks[label="Filter KS-matrix with EPS_FILTER", URL="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LS_SCF.html#desc_EPS_FILTER"] if_precon_ks -> do_filter_ks[label="no"]; do_precon_ks -> do_filter_ks[weight=0]; { rank=same; if_curvy [shape=diamond, label="CURVY_STEPS and\npurified P-matrix exits?", URL="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LS_SCF/CURVY_STEPS.html"]; do_curvy [label="CALL dm_ls_curvy_optimization()", width=3]; if_curvy -> do_curvy [taillabel="yes", minlen=1.5]; } do_filter_ks -> if_curvy; do_mixing; if_curvy -> do_mixing[label="no"]; { rank=same; if_trans [shape=diamond, label="TRANSPORT?", URL="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/QS.html#desc_TRANSPORT"]; do_trans [label="CALL external_scf_method()", width=3]; if_trans -> do_trans [taillabel="yes", minlen=1.5]; } do_mixing -> if_trans; select_method[shape=diamond, label="PURIFICATION_METHOD?", URL="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LS_SCF.html#desc_PURIFICATION_METHOD"]; if_trans -> select_method[label="no"]; { rank=same; dm_sign[label="CALL density_matrix_sign()", width=2.5]; dm_tc2[label="CALL density_matrix_tc2()", width=2.5]; dm_trs4[label="CALL density_matrix_trs4()", width=2.5]; } select_method -> dm_sign [label="SIGN_MATRIX"]; select_method -> dm_tc2 [label="TC2"]; select_method -> dm_trs4 [label="TRS4"]; { rank=same; if_precon_p [shape=diamond, label="S_PRECONDITIONER?", URL="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LS_SCF.html#list_S_PRECONDITIONER"]; do_precon_p [label="Precondition P-matrix", width=3]; if_precon_p -> do_precon_p [taillabel="yes", minlen=1.5]; } dm_sign -> if_precon_p; dm_tc2 -> if_precon_p; dm_trs4 -> if_precon_p; do_filter_p[label="Filter P-matrix with EPS_FILTER", URL="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LS_SCF.html#desc_EPS_FILTER"] if_precon_p -> do_filter_p[label="no"]; do_precon_p -> do_filter_p[weight=0]; do_dm_to_ks[label="CALL ls_scf_dm_to_ks()"] do_filter_p -> do_dm_to_ks; do_curvy -> do_dm_to_ks[weight=0]; do_trans -> do_dm_to_ks[weight=0]; if_converged[shape=diamond, label="Converged?"] do_dm_to_ks -> if_converged; do_qs_to_ls -> if_converged[headlabel="no", dir=back, weight=0]; do_post [label="CALL ls_scf_post()"]; if_converged -> do_post[taillabel="yes", minlen=1.5]; return [shape=ellipse, label="RETURN", width=1]; do_post -> return; }