monte_carlo module¶
Simple Monte Carlo routines for evaluating in the canonical ensemble.
-
monte_carlo.create_orb_list(probs, ne)¶ Create orbital list with \(N\) electrons
Parameters: Returns: - gen (boolean) – True if configuration with ne electrons was generated.
- selected_orbs (list) – Selected orbitals.
-
monte_carlo.gc_correction_free_energy(sys, cpot, beta, delta, delta_error)¶ - Canonical correction to free electron grand canonical partition function.
Assumption, \(Z_{GC}(N) / Z_{GC} = \delta\), so
\[-kT \log\delta = -kT \log Z_{GC}(N) + kT \log Z_{GC}.\]Therefore,
\[-kT \log Z_N = -kT \log \delta - kT \log Z_{GC} + \mu N,\]or
\[F^0_N = \Omega + \Delta(N) + \mu N.\]
Parameters: Returns: F_N – Canonical free electron Helmholtz free energy.
Return type:
-
monte_carlo.sample_canonical_energy(system, beta, nmeasure)¶ Sample canonical energy of a non-interacting system.
Properties of the non-interacting canonical system can be evaluated by simply discarding configurations generated in grand canonical ensemble whose particle number is not equal to the expected number of particles.Parameters: Returns: frame – Frame containing estimates for properties of system at temperature theta.
Return type: pandas.DataFrame