Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation and some bugfixes #21

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions mamonca/cMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,12 @@ bool cMC::thermodynamic_integration(){
}

void cMC::run_spin_dynamics(double kBT){
double mu_s = sqrt(2*constants.damping_parameter*constants.hbar*kBT/constants.delta_t);
{
for (int i=0; i<n_tot; i++)
atom[i].calc_spin_dynamics(
constants.damping_parameter, constants.delta_t, mu_s, lambda);
for (int i=0; i<n_tot; i++)
atom[i].update_spin_dynamics();
}
double mu_s = sqrt(18*constants.damping_parameter*constants.hbar*kBT/constants.delta_t);
for (int i=0; i<n_tot; i++)
atom[i].calc_spin_dynamics(
constants.damping_parameter, constants.delta_t, mu_s, lambda);
for (int i=0; i<n_tot; i++)
atom[i].update_spin_dynamics();
E_tot.add(get_energy(0), true);
if(thermodynamic_integration())
E_tot.add(get_energy(1), true);
Expand Down
6 changes: 3 additions & 3 deletions mamonca/cMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ class RandomNumberFactory{
} rand_generator;

struct Constants{
const double hbar = 0.6582119569;
const double kB = 8.617333262145e-5;
const double hbar = 0.6582119569; // eV * fs
const double kB = 8.617333262145e-5; // eV / K
double damping_parameter = 8.0e-3;
double delta_t = 1.0e-3;
double delta_t = 1.0e-3; // fs
} constants;

struct Product;
Expand Down
269 changes: 219 additions & 50 deletions notebooks/first_steps.ipynb

Large diffs are not rendered by default.

Loading
Loading