ChangelogΒΆ
v[0.4.8] - 2026-07-22ΒΆ
New Features πΒΆ
Now it is possible to use a different calculator for the MD simulation in the
BaseSimulatorclass. Thecalculatorparameter can be provided to thenptandnvtmethods, allowing users to specify a different calculator for energy calculations during the MD simulation. If not provided, the default model will be used.
Enhanced β¨ΒΆ
Fixed πΒΆ
Fixed a bug in the ase_utils.py file where the
output_intervalandmovie_intervalparameters were mixed up, resulting in incorrect logging intervals for the MD simulations. Now theoutput_intervalis correctly used for logging the MD simulation data, while themovie_intervalis used for controlling the frequency of snapshot saving.
Documentation πΒΆ
Add an example on how to use a different calculator for the MD simulation in the
GCMCclass.
Removed ποΈΒΆ
v[0.4.7] - 2026-07-22ΒΆ
New Features πΒΆ
Enhanced β¨ΒΆ
Changed the
BaseSimulatorclass to multiply the total energy by the supercell size when calculating the adsorption energy. This change ensures that the adsorption energy is correctly calculated based on the total energy of the system, which includes contributions from all atoms in the supercell.Created a new
CustomLennardJonescalculator based on JIT for improved performance in calculating Lennard-Jones interactions.Created a new
EwaldSumcalculator based on JIT for improved performance in calculating electrostatic interactions.Add workarounds for loading and saving labels in ASEβs Trajectory since it does not support custom arrays. Now the labels are saved in the
infoattribute of the Trajectory and loaded back into the Atoms object when reading the trajectory.Create new
CustomGNPcalculator to implemente the Generalized Nonbonded Potential (GNP) based on the work of Luo and Goddard III, J. Chem. Theory Comput. 2025, 21, 1, 499-515.Now a message is printed when the
GCMCtries to restart a simulation from a trajectory file that is empty or corrupted. This message informs the user that the last state of the simulation cannot be loaded, and that the simulation will start from scratch.
Fixed πΒΆ
Fixed a bug in the MD classes that was causing the
output_intervalandmovie_intervalparameters to be mixed up, resulting in incorrect logging intervals for the MD simulations. Now theoutput_intervalis correctly used for logging the MD simulation data, while themovie_intervalis used for controlling the frequency of snapshot saving.Fixed a bug in the
BaseSimulatorclass where theset_statemethod was not properly updating the current system state, which could lead to inconsistencies in the simulation. Now theset_statemethod correctly updates the current system state with the provided state, ensuring that the simulation runs with the correct configuration.Improve behavior when the cif file does not have partial charges.
Fixed the LennardJones parameters for the
UFFforce field.
Documentation πΒΆ
Improvements in the documentation.
Removed ποΈΒΆ
v[0.4.6] - 2026-04-14ΒΆ
New Features πΒΆ
Core implemenation of the
TMMCclass allowing to run transition matrix Monte Carlo insertion/deletion moves on-top of aGCMCor MD simulation.Added tests for the
Widomand theGCMCclass, likewise to theTMMCclass. With those tests the overall test coverage increases to 58%.
Enhanced β¨ΒΆ
Added
**kwargsto expose the interface of the underlyingaseMD classes allowing the user to pass on parameters via that overwrite the default values.Added the parameters
output_intervalandmovie_intervalto decouple those parameters from thesave_everyattribute.Added the
set_momentaparameter to switch on/off the initialization of atomic momenta based on the input temperature.
Fixed πΒΆ
Documentation πΒΆ
Removed ποΈΒΆ
v[0.4.5] - 2025-12-08ΒΆ
New Features πΒΆ
Added the
Reinsertionmove to the GCMC simulation. This move allows for the reinsertion of an adsorbate molecule that has been previously deleted, providing a mechanism to recover from unfavorable deletions and improve sampling efficiency.Added the
insert_moleculesmethod to theGCMCclass. This method allows users to insert a specified number of adsorbate molecules into the simulation box at once, facilitating the initialization of the system with a desired loading.Added excess uptake calculation to the GCMC simulation results.
Added the
void_fractionparameter to theGCMCclass that allows users to specify the void fraction of the structure for calculating the excess uptake.Added the
get_bulk_phase_molar_densityon thePengRobinsonEOSclass to calculate the bulk phase molar density needed for the excess uptake calculation.
Now it is possible to manually set the adsorbate and framework energy when initializing the
GCMCandWidomclasses. This allows users to provide pre-calculated energies for the adsorbate and framework.Added the
nPT_MTKNPTmethod on ase_utils for running NPT Molecular Dynamics (MD) simulations using the MTK NPT thermostat/barostat. This method is now the default for NPT MD simulations in theBaseSimulatorclass.
Fixed πΒΆ
Remove the
max_overlap_triesparameter from the GCMC class, as any value greater than 1 may cause problems on the GCMC simulation.Fix conversion factor for βnmolβ in BaseSimulator to account for supercell dimensions
Remove the
save_frequencyparameter from theWidomclass, to avoid confusion since the snapshots are now controlled by thesave_snapshotsparameter.Changed the default value for the LLM parameter in the GCMC class to False.
Rename the
N_adsattribute ton_adsorbatesin both theGCMCandWidomclasses for better clarity.
Enhanced β¨ΒΆ
Change the json output file name on the
GCMC.save_resultsmethod toresults_<T>_<P>.jsonif no file name is provided by the user.Add the
production_startparameter to theGCMC.equilibratemethod to allow users to specify the step from which the production analysis should begin. This provides greater flexibility in analyzing the simulation data and helps to exclude initial equilibration steps from the analysis, specially when running MD + GCMC simulations.Add the
save_snapshotsparameter to theWidomclass to allow users to control whether to save the simulation snapshots during the Widom insertion process. When set toTrue, the simulation state and results will be saved every step; when set toFalse, they will not be saved. By default, this parameter is set toTrue.Now
move_weightsparameter is a property in theGCMCclass, allowing for get and set methods to change the move weights after initialization.
Documentation πΒΆ
Att online documentation for the code at https://lipelopesoliveira.github.io/flames/
Removed ποΈΒΆ
v[0.4.4] - 2025-11-04ΒΆ
New Features πΒΆ
GCMC RDF: The
ase_utilsnow has therdf_gcmc, that can calculate the Radial Distribution Function (RDF) on a trajectory with different number of atoms.Added the
EwaldSumcalculator to calculate the electrostatic interactionsAdded the
CustomLennardJonescalculator to calculate the Lennard-Jones interaction energy
Fixed πΒΆ
Fix the bug where the
output_folderparameter was not being properly passed to theBaseSimulatoronGCMCclass.Fix a major bug in rotating molecules that have part of their atoms in one unit cell and parts in another.
Enhanced β¨ΒΆ
Introduced the
max_overlap_triesparameter inGCMCandWidomclasses to trynattempts for placing an adsorbate without van der Waals overlap. If a valid position is not found within the specified number of tries, the insertion is rejected. This applies to insertion, rotation and translation moves.Only create the
Trajectory_rejected.trajfile if thesave_rejectedparameter is set toTruewhen initializing theBaseSimulatorclass.Abstracted a few methods on the
Widomclass for better code reusability.Refactor the results json to improve the clarity
Both
WidomandGCMCclasses now saves the random seed and enlapsed time on theresults.jsonfile.Now the use of Left-most Local Minima for pyMSER equilibration can defined on the GCMC class through the
LLMparameter. By default it isTrue.Now the molecular rotation are based on a unit vector on a sphere, using the method proposed by George Marsaglia in The Annals of Mathematical Statistics, 1972, Vol. 43, No. 2, 645-646.
Documentation πΒΆ
Fix a bug on the isotherm simulation example.
Removed ποΈΒΆ
v[0.4.3] - 2025-10-15ΒΆ
New Features πΒΆ
Added support for custom output folders in the
GCMCandWidomclasses. Users can now specify a custom folder for saving output files through theoutput_folderparameter. If not provided, a default folder named βresults__ β will be created based on the simulation temperature and pressure.
Fixed πΒΆ
Enhanced β¨ΒΆ
Documentation πΒΆ
Removed ποΈΒΆ
v[0.4.2] - 2025-10-14ΒΆ
New Features πΒΆ
Added the
GCMC.equilibratemethod to allow users to perform equilibration analysis separately from the main simulation run. This method uses the pyMSER library to analyze the uptake data and determine when the system has reached equilibrium.Added the
GCMC.save_resultsmethod to save the results of the equilibration analysis to a JSON file. This includes key metrics such as average uptake, uncertainty, and enthalpy of adsorption.Allow for custom move weights in the GCMC simulation. Users can now specify different probabilities for insertion, deletion, translation, and rotation moves through the
move_weightsparameter when initializing theGCMCclass. This provides greater flexibility in tailoring the simulation to specific systems or research needs.Improved the logging of Widom simulation results to include standard deviations for both the Henry coefficient and the enthalpy of adsorption. The standard deviations are calculated using 5-fold cross-validation, providing a more robust measure of uncertainty in the results.
Added the
Widom.save_resultsmethod to include standard deviations for the Henry coefficient and enthalpy of adsorption.Added the
save_rejectedparameter to both theGCMCandWidomclasses. When set toTrue, this parameter enables the saving of rejected moves to a separate trajectory file, allowing users to analyze these configurations post-simulation.
Fixed πΒΆ
The %wt conversion factor was incorrectly calculated using a factor of 1e-3 instead of 1e-1. This has been corrected in the
GCMCclass and related calculations to ensure accurate representation of adsorption data in weight percent.The restart method in the
GCMCclass was not properly resetting the simulation state. This has been fixed to ensure that all relevant attributes are correctly reinitialized when restarting a simulation.
Enhanced β¨ΒΆ
Improved the handling of tags in the ASE Atoms objects for both the framework and adsorbate molecules. The framework atoms are now tagged with
0, and adsorbate atoms are tagged with1. This tagging system helps differentiate between framework and adsorbate atoms during simulations and analyses. This is also a necessary step for future implementations of multiple adsorbates.Now the rotation movements are restricted to an arc of -15 to +15 degrees around an random axis instead of a full random rotation. This change aims to improve the acceptance rate of rotation moves in the GCMC simulation by making smaller, more controlled adjustments to the adsorbate positions. This angle can be adjusted by the user through the
max_rotation_angleparameter when initializing theGCMCclass.
Documentation πΒΆ
Examples have been updated to save the results of the simulations using the new
save_resultsmethod.
Removed ποΈΒΆ
v[0.4.1] - 2025-09-19ΒΆ
New Features πΒΆ
The final name of the package is now
FLAMES - Flexible Lattice Adsorption by Monte Carlo Engine Simulation. The code repository, documentation site, and examples have been updated to reflect this change.
Fixed πΒΆ
Enhanced β¨ΒΆ
Added a
max_deltaEparameter to theBaseSimulator,GCMC, andWidomclasses to prevent errors from the model during energy calculations. This parameter sets a maximum threshold for energy changes, ensuring numerical stability during simulations. The default value is set to 1.555 eV (150 kJ/mol).Change the
random_seedparameter to pick a random integer between 1 and 1,000,000 if not provided by the user. This ensures the use of a valid seed for the random number generator, enhancing reproducibility in simulations.
Documentation πΒΆ
Removed ποΈΒΆ
v[0.4.0] - 2025-09-04ΒΆ
New Features πΒΆ
Added the Peng-Robinson equation of state (EOS) to the
mlp_adsorption.eosmodule.This allows for the calculation of fugacity coefficients and bulk phase density using the Peng-Robinson EOS.
Add functions to calculate perpendicular lengths and unit cell repetitions in
utilities.Add a new parameter
cutoffon themlp.gcmcclass for controlling the supercell check based on a cutoff radius for the potential.Add the
get_densityfunction to themlp_adsorption.utilitiesmodule.Add a
mlp_adsorption.utilities.make_cubicfunction that can create a cubic (or close to) supercell from a given structure.Now all movements are based on a
numpy.random.Generatorto ensure reproducibility. Arandom_seedcan be provided to theGCMCandWidomclasses for this purpose.New module for checking the overlap between atoms (
mlp_adsorption.operations.check_overlap)A new
BaseSimulatormethod created to abstract the system state management and general simulation logic.Now all the output of the simulations are managed by a
mlp_adsorption.loggerinstance. It introduces:BaseLogger: A base class for logging simulation information, including restart and iteration details.GCMCLogger: A logger specifically for GCMC simulations, extendingBaseLoggerwith additional functionality.WidomLogger: A logger specifically for Widom simulations, extendingBaseLoggerwith additional functionality.
Now the
Widomhas arestartmethod to allow restarting a Widom simulation from a saved state. Since Widom does not insert adsorbates on the structure, it simply reads the existing list of insertion energies and use it to update the simulation statistics.Now the code uses pyMSER to evaluate the equilibration of the simulation and calculate the average uptake and enthalpy of adsorption.
Fixed πΒΆ
Fix the framework density calculation on
GCMCandWidomclass.Fix an error on the check if the optimization converged.
Enhanced β¨ΒΆ
Move the random operations (insertion, rotation, translation) to a separate
mlp_adsorption.operations.pymodule for better organization and reusability.
Documentation πΒΆ
Add the critical parameters to the examples.
Removed ποΈΒΆ
Old
mlp_adsorption.operations.vdw_overlapandmlp_adsorption.operations.vdw_overlap2functions.
v[0.3.2] - 2025-08-17ΒΆ
New Features πΒΆ
New
restartmethod in theGCMCclass to allow restarting a GCMC simulation from a saved state.It reads the state from an existing
Trajectoryobject, enabling the continuation of simulations without losing progress.It reads the total uptake, total energy, and adsorption energy
npyfiles for seamless simulation restoration.
Now the
vdw_factorcan be set when initializing theGCMCclass, allowing for more flexible control over the Van der Waals radii scaling. By default, it is set to 0.6.Add
flush=Trueto print statements for immediate output in optimization and simulation logs
Fixed πΒΆ
Fixed the handling of NaN values in the Van der Waals radii in both
gcmc.pyandwidom.pyfiles to ensure that any NaN value is replaced by 1.5, preventing potential issues during simulations.Fixed unit for Henry constant on header and footer of Widom output. Now it correctly reports the unit as [mol kg-1 Pa-1].
Change the energy return value in the
try_insertionmethod of theWidomclass to 1000 eV when there is a Van der Waals overlap and limit the number of insertion attempts to 100. This change ensures that the method prevents an infinite loop in the simulation.
Enhanced β¨ΒΆ
Restart of a GCMC simulation:
Now the
load_statemethod in theGCMCclass can load the state from aTrajectoryobject, allowing for restarting simulations from saved states.
Add new examples for running GCMC simulations with different configurations, including:
Basic
Widom Insertion
Rigid GCMC
Rigid GCMC Isotherm
Intermediate
Geometry Optimization + GCMC
Flexible GCMC: Molecular Dynamics + GCMC
Documentation πΒΆ
New examples are documented in the README file, providing clear instructions on how to run GCMC simulations and Widom insertion tests.
Removed ποΈΒΆ
Removed commented-out code for saving the system state in xyz format in the
gcmc.pyfile to clean up the codebase.
v[0.3.1] - 2025-08-05ΒΆ
New Features πΒΆ
Fixed πΒΆ
Fixed the calculation of Henryβs law constant in the Widom insertion method to ensure it is correctly computed in units of [mol kg-1 Pa-1].
Fixed the calculation of the heat of adsorption (Qst) in the Widom insertion method to ensure it is correctly computed in units of [kJ/mol].
Enhanced β¨ΒΆ
Documentation πΒΆ
Removed ποΈΒΆ
v[0.3.0] - 2025-07-31ΒΆ
New Features πΒΆ
Now GCMC has three different methods for NPT Molecular Dynamics (MD):
Isotropic volume change and fixed shape with Berendsen thermostat/barostat (
mode=iso_shape)Anisotropic volume change and fixed shape with Berendsen thermostat/barostat (
mode=aniso_shape)Anisotropic volume change and flexible shape with Nose-Hoover/Parrinello-Rahman thermostat/barostat (
mode=aniso_flex).
Added a new method
nvtto the GCMC class for running NVT MD simulations.
Fixed πΒΆ
#10 - The cell angles are not changing during the MD simulation.
Enhanced β¨ΒΆ
Now the NPT MD simulation log also prints the cell volume.
Now it is possible to control the type of NPT MD simulation through the use of a keyword argument on the
nptmethod of GCMC simulation.
Documentation πΒΆ
Removed ποΈΒΆ
v[0.2.0] - 2025-07-12ΒΆ
New Features πΒΆ
Support for saving the snapshots of the simulation on the same trajectory file in the
gcmc.pyandwidom.pycodes.New examples for using the GCMC and Widom insertion methods in the
examplesdirectory.
Fixed πΒΆ
Incorrect statement on the insertion method in the
gcmc.pyfile.
Enhanced β¨ΒΆ
Updated the
gcmc.pyfile to use theTrajectory.writemethod instead ofwrite_proteindatabank.Updated the
ase_utils.pyfile to accept atrajectoryparameter in thenpt_mdfunction.Replaces PDB output with ASE Trajectory for snapshot saving in
widom.py.Removed the unused import of
write_proteindatabankinwidom.py.
Documentation πΒΆ
Added docstrings to all functions and classes in the
gcmc.pyandwidom.pyfiles.Updated the README file with examples of how to use the GCMC and Widom insertion methods.
Removed ποΈΒΆ
Unused imports and commented-out code in
widom.py.
v[0.1.0] - 2025-07-12ΒΆ
Initial release of the MLP Adsorption code, including the GCMC and Widom methods with basic functionality on the simulation of adsorption processes.