Copy_test : modif boucle, Calcul : modif CI
This commit is contained in:
parent
e94a23fff0
commit
a44126a743
@ -618,7 +618,7 @@
|
|||||||
" in\n",
|
" in\n",
|
||||||
" let m_new_m_C , critere_D, norme_alpha = new_m_C m_C methode \n",
|
" let m_new_m_C , critere_D, norme_alpha = new_m_C m_C methode \n",
|
||||||
" in\n",
|
" in\n",
|
||||||
" let diff = prev_critere_D -. critere_D +. 1.\n",
|
" let diff = prev_critere_D -. critere_D \n",
|
||||||
"\n",
|
"\n",
|
||||||
"in\n",
|
"in\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -795,7 +795,7 @@
|
|||||||
" \n",
|
" \n",
|
||||||
"let ci_coef, ci_energy = Lazy.force ci.eigensystem ;;\n",
|
"let ci_coef, ci_energy = Lazy.force ci.eigensystem ;;\n",
|
||||||
"let m_ci_coef = Mat.as_vec ci_coef;;\n",
|
"let m_ci_coef = Mat.as_vec ci_coef;;\n",
|
||||||
"Vec.iteri (fun i x -> Printf.printf \"%e %f\\n\" i x) ci_coef;;\n"
|
"Vec.iteri (fun i x -> Printf.printf \"%d %e\\n\" i x) m_ci_coef;;"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
1878
Copy_test.ipynb
Normal file
1878
Copy_test.ipynb
Normal file
File diff suppressed because it is too large
Load Diff
49
Work.ipynb
49
Work.ipynb
@ -1792,9 +1792,9 @@
|
|||||||
"(* Calcul de la nouvelle matrice des coefficient après n rotation d'orbitales *)\n",
|
"(* Calcul de la nouvelle matrice des coefficient après n rotation d'orbitales *)\n",
|
||||||
"let rec localisation m_C methode epsilon n prev_critere_D cc=\n",
|
"let rec localisation m_C methode epsilon n prev_critere_D cc=\n",
|
||||||
"\n",
|
"\n",
|
||||||
" (*Printf.printf \"%i\\n%!\" n;*)\n",
|
" Printf.printf \"%i\\n%!\" n;\n",
|
||||||
"\n",
|
"\n",
|
||||||
" (*Util.debug_matrix \"m_C\" m_C;*)\n",
|
" Util.debug_matrix \"m_C\" m_C;\n",
|
||||||
"\n",
|
"\n",
|
||||||
"if n == 0 \n",
|
"if n == 0 \n",
|
||||||
" then m_C\n",
|
" then m_C\n",
|
||||||
@ -1811,14 +1811,14 @@
|
|||||||
" let critere_D = alphad.d \n",
|
" let critere_D = alphad.d \n",
|
||||||
" in\n",
|
" in\n",
|
||||||
" \n",
|
" \n",
|
||||||
" (*Printf.printf \"%f\\n%!\" critere_D;*)\n",
|
" Printf.printf \"%f\\n%!\" critere_D;\n",
|
||||||
" \n",
|
" \n",
|
||||||
" (* Matrice des alphas *)\n",
|
" (* Matrice des alphas *)\n",
|
||||||
" let m_alpha = alphad.m_alpha\n",
|
" let m_alpha = alphad.m_alpha\n",
|
||||||
" in\n",
|
" in\n",
|
||||||
" let norme_alpha = norme m_alpha\n",
|
" (*let norme_alpha = norme m_alpha\n",
|
||||||
" in\n",
|
" in*)\n",
|
||||||
" \n",
|
" Util.debug_matrix \"new_alpha_m\" m_alpha;\n",
|
||||||
" (*Printf.printf \"%f\\n%!\" norme_alpha;*)\n",
|
" (*Printf.printf \"%f\\n%!\" norme_alpha;*)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" (*Util.debug_matrix \"m_alpha\" m_alpha;*)\n",
|
" (*Util.debug_matrix \"m_alpha\" m_alpha;*)\n",
|
||||||
@ -1833,7 +1833,7 @@
|
|||||||
" let alpha = (alphaij.alpha_max) *. epsilon \n",
|
" let alpha = (alphaij.alpha_max) *. epsilon \n",
|
||||||
" in\n",
|
" in\n",
|
||||||
"\n",
|
"\n",
|
||||||
" (*Printf.printf \"%f\\n%!\" alpha;*)\n",
|
" Printf.printf \"%f\\n%!\" alpha;\n",
|
||||||
" \n",
|
" \n",
|
||||||
" (* Indice i et j du alpha max après calcul *)\n",
|
" (* Indice i et j du alpha max après calcul *)\n",
|
||||||
" let indice_i = alphaij.indice_ii \n",
|
" let indice_i = alphaij.indice_ii \n",
|
||||||
@ -1880,21 +1880,22 @@
|
|||||||
" (*Util.debug_matrix \"m_interm\" m_interm;*)\n",
|
" (*Util.debug_matrix \"m_interm\" m_interm;*)\n",
|
||||||
" \n",
|
" \n",
|
||||||
" (* Matrice après rotation *)\n",
|
" (* Matrice après rotation *)\n",
|
||||||
" ( Mat.add m_Psi_tilde m_interm, critere_D, norme_alpha)\n",
|
" ( Mat.add m_Psi_tilde m_interm, critere_D)\n",
|
||||||
|
" \n",
|
||||||
" in\n",
|
" in\n",
|
||||||
" let m_new_m_C , critere_D, norme_alpha = new_m_C m_C methode \n",
|
" let m_new_m_C , critere_D = new_m_C m_C methode \n",
|
||||||
" in\n",
|
" in\n",
|
||||||
" let diff = prev_critere_D -. critere_D +. 1.\n",
|
" let diff = prev_critere_D -. critere_D\n",
|
||||||
"\n",
|
"\n",
|
||||||
"in\n",
|
"in\n",
|
||||||
"\n",
|
"\n",
|
||||||
"(*Util.debug_matrix \"new_alpha_m\" (f_alpha m_C);*)\n",
|
"(*Util.debug_matrix \"new_alpha_m\" (f_alpha m_C);*)\n",
|
||||||
"(*Util.debug_matrix \"m_new_m_C\" m_new_m_C;*)\n",
|
"Util.debug_matrix \"m_new_m_C\" m_new_m_C;\n",
|
||||||
"\n",
|
"\n",
|
||||||
"if diff**2. < cc**2.\n",
|
"if diff**2. < cc**2.\n",
|
||||||
" then m_new_m_C\n",
|
" then m_new_m_C\n",
|
||||||
" else\n",
|
" else\n",
|
||||||
"localisation m_new_m_C methode epsilon (n-1) critere_D cc;;"
|
"localisation m_new_m_C methode epsilon (n-1) critere_D cc;;\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1907,9 +1908,9 @@
|
|||||||
"(* Fonction / Matrice des coef / Méthode(\"Boys\" ou \"ER\") / Pas(<=1.) \n",
|
"(* Fonction / Matrice des coef / Méthode(\"Boys\" ou \"ER\") / Pas(<=1.) \n",
|
||||||
"/ Nombre d'itérations max / 0. (valeur de D pour initier la boucle) / critère de convergence sur D*)\n",
|
"/ Nombre d'itérations max / 0. (valeur de D pour initier la boucle) / critère de convergence sur D*)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"(*let new_m_boys = localisation m_C \"boys\" 1. 100 0. 10e-7;;\n",
|
"let new_m_boys = localisation m_C \"boys\" 1. 5 0. 10e-7;;\n",
|
||||||
"let new_m_er = localisation m_C \"ER\" 1. 100 0. 10e-7;;\n",
|
"(*let new_m_er = localisation m_C \"ER\" 1. 100 0. 10e-7;;\n",
|
||||||
"*)"
|
"*)\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1987,20 +1988,19 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"jupyter": {
|
|
||||||
"outputs_hidden": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"(*let new_m_boys = localisation m_C \"boys\" 1. 100 0. 10e-7;;\n",
|
"(*let new_m_boys = localisation m_C \"boys\" 1. 100 0. 10e-7;;\n",
|
||||||
"let new_m_er = localisation m_C \"ER\" 1. 100 0. 10e-7;;\n",
|
"let new_m_er = localisation m_C \"ER\" 1. 100 0. 10e-7;;\n",
|
||||||
"*)\n",
|
"*)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"let loc_m_occ_boys = localisation m_occ \"boys\" 0.9 100 0. 10e-7;;\n",
|
"let loc_m_occ_boys = localisation m_occ \"boys\" 1. 100 0. 10e-7;;\n",
|
||||||
|
"\n",
|
||||||
|
"(*\n",
|
||||||
"let loc_m_vir_boys = localisation m_vir \"boys\" 1. 100 0. 10e-7;;\n",
|
"let loc_m_vir_boys = localisation m_vir \"boys\" 1. 100 0. 10e-7;;\n",
|
||||||
"let m_assemble_boys = assemble loc_m_occ_boys loc_m_vir_boys;;\n",
|
"let m_assemble_boys = assemble loc_m_occ_boys loc_m_vir_boys;;\n",
|
||||||
|
"*)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"(*\n",
|
"(*\n",
|
||||||
"let loc_m_occ_er = localisation m_occ \"ER\" 1. 100 0. 10e-7;;\n",
|
"let loc_m_occ_er = localisation m_occ \"ER\" 1. 100 0. 10e-7;;\n",
|
||||||
@ -2145,6 +2145,13 @@
|
|||||||
"Vec.iteri (fun i x -> Printf.printf \"%e %f\\n\" i x) ci_coef;;\n",
|
"Vec.iteri (fun i x -> Printf.printf \"%e %f\\n\" i x) ci_coef;;\n",
|
||||||
"*)\n"
|
"*)\n"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
Loading…
Reference in New Issue
Block a user