Releases: JuliaMolSim/Molly.jl
Releases Β· JuliaMolSim/Molly.jl
v0.22.0
The package is rewritten to use Enzyme.jl rather than Zygote.jl for differentiable simulations. This allows mutating code to be used, leading to better performance on CPU and GPU. In addition, faster CUDA kernels are added and support for other GPU backends is added via KernelAbstractions.jl.
Breaking changes
CoordinateLogger
,VelocityLogger
andForceLogger
are renamed toCoordinatesLogger
,VelocitiesLogger
andForcesLogger
respectively for consistency.- During system setup the
gpu
keyword argument is replaced byarray_type
, withCuArray
giving the same behaviour as before. Use of other array types such asROCArray
is supported. Theuse_cell_list
keyword argument is replaced withneighbor_finder_type
, with the default depending on the backend. - The second type parameter to
System
is changed from aBool
indicating whether the system is on the GPU to the array type of the system. - Giving the
force_units
andenergy_units
is no longer required when constructing pairwise interactions such asLennardJones
. In addition, mixing functions and shortcut functions can now be given to determine how to combine atomic parameters and when to skip the interaction respectively. - The arguments to
force
andpotential_energy
for pairwise and specific interactions are changed to allow more flexible interaction definitions, depending for example on the velocities or step number. - Differentiable simulations are no longer compatible with Zygote.jl, but can now be carried out using Enzyme.jl. This is faster and more memory-efficient.
- The
solute
field toAtom
is removed and theatom_type
field is added.weight_solute_solvent
is no longer an option forLennardJones
, though similar functionality is available withatom_type
and mixing functions. box_volume
is renamed tovolume
.run_loggers!
is renamed toapply_loggers!
to avoid confusion with therun_loggers
function argument.- The abstract types
PairwiseInteraction
andSpecificInteraction
are removed. Custom interactions no longer need to sub-type anything. - Extensions are added for code requiring Enzyme.jl, CUDA.jl and KernelDensity.jl, so relevant imports are now required before using those features.
Non-breaking changes
- Support for Julia versions before 1.10 is dropped.
New features
- Backends supported by KernelAbstractions.jl can be used to run simulations by using the appropriate array type or the
array_type
keyword argument during system setup. - The Berendsen pressure coupling method is added as
BerendsenBarostat
. - The
density
anddipole_moment
functions are added. - The
AshbaughHatch
andYukawa
potentials are added. VolumeLogger
andDensityLogger
are added.- The
rng
keyword argument is added toplace_atoms
,place_diatomics
andrandom_coord
, allowing reproducible coordinate generation. - The
array_type
function is added, giving the array type of a system or array. - The step number can be given as a third argument with a default of
0
toforces
,potential_energy
andvirial
acting on a system. This allows time-dependent forces, with the caveat that the step number resets to 1 every timesimulate!
is called and can also be 0 to calculate forces before the first step. - A method is added to
random_velocities!
which takes in and modifies the velocities as the first argument.
Performance improvements
- Better CUDA force and potential energy kernels significantly improve performance on CUDA compatible devices. The
GPUNeighborFinder
is added for this path but does not calculate neighbors, which are calculated each step in the kernels. - Simulations are faster on both CPU and GPU due to mutating code leading to fewer memory allocations.
- System setup from a file is made much faster.
- The package is faster to load as a number of dependencies have been removed.
- The performance of implicit solvent on CPU is improved.
Bug fixes
- A bug when using more than two interactions on the GPU is fixed.
- A type conversion bug in
CellListMapNeighborFinder
construction is fixed.
v0.21.2
Non-breaking changes
- Updates are made for AtomsBase.jl 0.4. AtomsBase is no longer re-exported.
v0.21.1
Non-breaking changes
- Compatibility bounds are updated for various packages.
Bug fixes
- A bug in boundary gradient calculation is fixed.
v0.21.0
Breaking changes
- Observable functions for
GeneralObservableLogger
now need to accept arbitrary keyword arguments, for example by addingkwargs...
to the function call. This allows the logging changes described below.
Non-breaking changes
- Support for Julia versions before 1.9 is dropped. A package extension, rather than Requires.jl, is used to provide
visualize
when GLMakie.jl is imported.
New features
ASECalculator
is added, allowing Python ASE calculators to be used in Molly. The code is in a package extension available when PythonCall.jl is imported. It is the user's responsibility to have the required Python packages installed. Examples of using MACE and psi4 are given.current_forces
andcurrent_potential_energy
can be used in logging functions to reuse properties calculated in the simulation step. They default tonothing
when the properties are not available.- Interaction types are allowed to be different for each replica in a
ReplicaSystem
.
Performance improvements
PotentialEnergyLogger
,TotalEnergyLogger
andForceLogger
avoid recomputation when the relevant properties are calculated in the simulation step.
Bug fixes
MollyCalculator
now works in two dimensions and for other floating point types.
v0.20.0
Breaking changes
apply_constraints!
andSHAKE
are removed as part of the changes to constraints.- The
System
constructor for AtomsBase.jl systems is changed to takeforce_units
andenergy_units
as keyword arguments rather than positional arguments. The defaults are consistent with the rest of Molly. velocity_autocorr
is removed sinceAutoCorrelationLogger
provides a more general version of this functionality.
New features
- Support for constraints is improved and documented with
SHAKE_RATTLE
allowing the SHAKE and RATTLE algorithms to be applied as appropriate to most simulators.DistanceConstraint
,disable_constrained_interactions!
,apply_position_constraints!
,apply_velocity_constraints!
,check_position_constraints
andcheck_velocity_constraints
are all added. Constraints are not currently compatible with GPU simulation. - Gradients with respect to the boundary can now be calculated in some contexts.
Community
- A logo is added to the project.
Bug fixes
- A bug in
FENEBond
potential energy calculation is fixed.
v0.19.0
Breaking changes
- General interactions are changed to use the AtomsCalculators.jl interface, allowing simulations to be run with calculators from other packages. A tuple of interactions compatible with the AtomsCalculators.jl interface should be given to
general_inters
when constructing aSystem
.ImplicitSolventOBC
,ImplicitSolventGBN2
andMullerBrown
are changed to be calculators. - The type parameters of
System
andReplicaSystem
are changed.
New features
forces
,accelerations
,potential_energy
,total_energy
,virial
andpressure
now calculate the neighbors by default when called without neighbors. If they are being reused, neighbors should be pre-computed as before for performance.System
andReplicaSystem
now have adata
field, set with thedata
keyword argument to the constructors, that can be used to store arbitrary data. This data can be accessed inside simulators.LennardJonesSoftCore
,CoulombSoftCore
and custom atom types are now compatible with gradients.
v0.18.4
Bug fixes
- A bug that prevented system setup on Julia 1.7 is fixed.
- A type preservation bug in the
rdf
function is fixed.
v0.18.3
New features
- Compatibility with AtomsCalculators.jl is added via
MollyCalculator
. - The documentation on setting up systems from structure files is improved.
- A list of relevant publications is added to the documentation.
Community
- The Contributor Covenant Code of Conduct is added to the project.
Bug fixes
- A bug in the
NoseHoover
simulator when not using units is fixed.
v0.18.2
Performance improvements
- The
vector
function for calculating the displacement between coordinates accounting for periodic boundary conditions is made faster, improving simulation performance on CPU and GPU.
v0.18.1
New features
- Simulation of overdamped Langevin dynamics is added as
OverdampedLangevin
.
Performance improvements
- The performance of force calculation without a neighbor list on the GPU is significantly improved.
Bug fixes
- A bug in compatibility with SimpleCrystals.jl is fixed.