Hi!
I would like to calculate and print the chemical potential for every step of a molecular dynamics (MD) simulation.
I have used one of the tutorials to generate the MD script and to print the chemical potential. Here the last lines of the script:
"
nlsave('output.nc', bulk_configuration)
# -------------------------------------------------------------
# Molecular Dynamics
# -------------------------------------------------------------
initial_velocity = None
method = NVTBerendsen(
time_step=0.5*femtoSecond,
reservoir_temperature=300*Kelvin,
thermal_coupling_constant=500*femtoSecond,
initial_velocity=initial_velocity
)
md_trajectory = MolecularDynamics(
bulk_configuration,
trajectory_filename='trajectory.nc',
steps=100000,
log_interval=2,
method=method
)
bulk_configuration = md_trajectory.lastImage()
nlsave('output.nc', md_trajectory)
# -------------------------------------------------------------
# Chemical Potential
# -------------------------------------------------------------
chemical_potential = ChemicalPotential(bulk_configuration)
nlsave('output.nc', chemical_potential)
nlprint(chemical_potential)
"
In this way, the chemical potential is not printed out though.
Is it possible to print the chemical potential at each step? If yes, how?
Thank you in advance,
best regards,
Ivano