ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
lambda_loop_diag.cpp File Reference

Linear lambda scan mode for energy landscape mapping. More...

#include "spin_constrain.h"
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include "basic_funcs.h"
#include "source_base/constants.h"
#include "source_io/module_parameter/parameter.h"
Include dependency graph for lambda_loop_diag.cpp:

Detailed Description

Linear lambda scan mode for energy landscape mapping.

Purpose
Instead of optimizing lambda to match target moments, this function sweeps lambda values from sc_scan_lambda_start to sc_scan_lambda_end in equal steps, computing Mi at each point. Useful for:
  • Debugging: understanding the Mi vs lambda relationship
  • Plotting: creating E(lambda) curves for analysis
  • Validation: checking that Mi responds monotonically to lambda
Output
Results written to lambda_scan_results.dat with columns: step, lambda_eV_uB, Mi_x_0, Mi_y_0, Mi_z_0, Mi_x_1, ...