Releases: JuliaMolSim/Molly.jl
Releases · JuliaMolSim/Molly.jl
v0.17.0
Breaking changes
run_loggers
is no longer available as a keyword argument toSteepestDescentMinimizer
andlog_states
is no longer available as a keyword argument when callingsimulate!
withMetropolisMonteCarlo
. Insteadrun_loggers
can be given as a keyword argument tosimulate!
as described below.
New features
- The Monte Carlo anisotropic barostat is added as
MonteCarloAnisotropicBarostat
, allowing separate pressure coupling in each dimension. - The Monte Carlo membrane barostat is added as
MonteCarloMembraneBarostat
, allowing pressure coupling for systems involving a membrane. - A
System
constructor is added to create systems from a SimpleCrystals.jlCrystal
struct. - A convenience constructor is added for
System
allowing an existingSystem
to be copied with given properties changed. run_loggers
can be given as a keyword argument tosimulate!
to determine whether the loggers are run. The options aretrue
,false
or:skipzero
, in which case the loggers are not run before the first step.run_loggers
istrue
by default except forSteepestDescentMinimizer
, where it isfalse
.run_loggers!
now has a fourth argument which determines whether the loggers are run, defaulttrue
.- The scale factor given to
scale_coords!
can now be aSVector
corresponding to the scaling factor for each axis in addition to a single number. - General interactions can now implement a method for
virial
.
Bug fixes
- A bug in force calculation with more than two interactions on the GPU is fixed.
- A bug allowing multiple 1-4 scaling values to be read from an OpenMM force field XML file is fixed.
v0.16.0
Breaking changes
apply_coupling!
now returns whether the coupling has invalidated the currently stored forces, for example by changing the coordinates.find_neighbors
now takes another optional argument which determines whether the neighbor list should be forced to recompute, regardless of the step number.- The type parameters of
System
,ReplicaSystem
,AtomType
andLangevin
are changed.
New features
- The Monte Carlo barostat is added as
MonteCarloBarostat
, allowing pressure coupling during simulations. - The virial and pressure can be calculated for systems where only the pairwise interactions contribute to the virial using
virial
andpressure
. Corresponding loggers are added asVirialLogger
andPressureLogger
. - The
scale_boundary
,scale_coords!
andmolecule_centers
functions are added. - The
topology
keyword argument forSystem
can provide information about which atoms are in the same molecule, with this information stored as aMolecularTopology
when reading aSystem
from a file. The corresponding keyword argumentstopology
andreplica_topology
are added toReplicaSystem
. - Multiple couplers can be given to the
coupling
argument of compatible simulators as aTuple
or aNamedTuple
.Langevin
is now compatible with couplers. - Warnings are given for skipped incompatible fields when reading OpenMM XML force field files. Using atom charges from residue templates is no longer required.
- The
use_cell_list
keyword argument is added to theSystem
constructor from files. Unitful.ustrip
is now defined forCubicBoundary
andRectangularBoundary
.
v0.15.0
The core of the package is rewritten to use CUDA.jl kernels on the GPU path for increased performance and GPU memory usage. Enzyme.jl is used along with Zygote.jl to differentiate through simulations on CPU and GPU for increased performance.
Breaking changes
- The
nl_only
field of pairwise interactions is replaced with ause_neighbors
function, which accesses ause_neighbors
field of the struct for built-in interactions. Custom pairwise interactions can define a method for this function, which returnsfalse
by default. - The
weight_14
field of pairwise interactions has been renamed toweight_special
and theweight_14
argument toforce
has been renamed tospecial
. Thenb_matrix
andmatrix_14
fields of neighbor finders have been renamed toeligible
andspecial
respectively. OpenMMForceField
,OpenMMResidueType
andOpenMMAtomType
are renamed toMolecularForceField
,ResidueType
andAtomType
respectively.- The penultimate argument to
InteractionList1Atoms
etc., the interaction type names, is now an optional final argument that defaults to a vector of empty strings. The type parameters are also changed. velocity
is renamed torandom_velocity
andrand_coord
is renamed torandom_coord
.DistanceVecNeighborFinder
andNeighborListVec
are removed sinceDistanceNeighborFinder
andNeighborList
now work on the GPU and with automatic differentiation.- The
gpu_diff_safe
argument is no longer available when setting up aSystem
since the CPU path is now differentiable.is_gpu_diff_safe
is removed. - The type parameters of
System
,ReplicaSystem
,DistanceNeighborFinder
andNeighborList
are changed. - The
@fastmath
macro is no longer used in the package.
Non-breaking changes
DistanceNeighborFinder
andTreeNeighborFinder
now return lists of neighboring pairs in ascending order of index.
New features
- The Nosé-Hoover simulator is added as
NoseHoover
. potential_energy
andtotal_energy
are now compatible with automatic differentiation on CPU and GPU. They can also now be run in parallel using then_threads
keyword argument, with this being the default behaviour.CubicBoundary
andRectangularBoundary
can take a single value as an argument, indicating the same size in all dimensions. They must take positive side lengths.- The
remove_CM_motion
argument to simulators can be set to an integer, in which case the center of mass motion is removed every given number of steps. The default remains to remove the center of mass motion every step. - The
kappa
andrename_terminal_res
keyword arguments are available as arguments when constructing aSystem
from a file and a force field. - Differentiable simulation now works with any combination of built-in or custom interactions.
- Differentiable simulation now works with multithreading on the CPU.
- The number of GPU threads used for the CUDA.jl kernels can be tuned with the environmental variables
MOLLY_GPUNTHREADS_PAIRWISE
,MOLLY_GPUNTHREADS_SPECIFIC
,MOLLY_GPUNTHREADS_DISTANCENF
andMOLLY_GPUNTHREADS_IMPLICIT
. - A section on development is added to the documentation and other areas of the documentation are expanded.
Performance improvements
- Force calculation, energy calculation, simulation and implicit solvent force/energy calculation are all made faster on CPU and GPU.
- GPU memory usage is reduced significantly, allowing the simulation of larger systems.
- Differentiable simulation is made faster on CPU and GPU.
Bug fixes
- Bugs in boundary and system indexing are fixed.
- A bug in implicit solvent automatic differentiation is fixed.
- A bug allowing incorrect units to be used in general interactions is fixed.
v0.14.3
Bug fixes
- A bug introduced by a new version of ForwardDiff.jl is fixed.
v0.14.2
New features
- The Müller-Brown potential is added as
MullerBrown
.
v0.14.1
New features
- The Buckingham potential is added as
Buckingham
. - Polymer melt and density functional theory examples are added to the documentation.
Bug fixes
- A bug introduced by a new version of AtomsBase.jl is fixed. In addition, atoms in systems without
atoms_data
defined now return:unknown
fromAtomsBase.atomic_symbol
. - A bug in the export of
OpenMMResidueType
is fixed.
v0.14.0
Breaking changes
- The type parameters and fields of
System
,ReplicaSystem
,ImplicitSolventOBC
andImplicitSolventGBN2
are changed. - The type parameters of
TemperatureREMD
are changed.
Non-breaking changes
- The
mass
function falls back to accessing themass
field, making it easier to define custom atom types.
New features
- A Monte Carlo simulator that uses the Metropolis algorithm is added as
MetropolisMonteCarlo
.MonteCarloLogger
is added to record acceptance information.random_uniform_translation!
andrandom_normal_translation!
are added to generate trial moves. HamiltonianREMD
is added to allow REMD with different interactions for each replica.remd_exchange!
andsimulate_remd!
are added to allow custom REMD simulators to be defined by giving the exchange function.replica_pairwise_inters
,replica_specific_inter_lists
andreplica_general_inters
can now be given when constructing aReplicaSystem
to allow different interactions for each replica.- Soft core versions of the Lennard-Jones and Coulomb interactions are added as
LennardJonesSoftCore
andCoulombSoftCore
. - Preliminary support for bonded constraints using the SHAKE algorithm is added via
SHAKE
andapply_constraints!
.constraints
can be used to define the constraints when constructing aSystem
, with corresponding arguments for aReplicaSystem
. This feature is still under development and is not fully documented yet. - Additional keyword arguments can now be used in
log_property!
, making the logging of properties in custom simulators easier. - A section on related software is added to the documentation.
Performance improvements
- Implicit solvent force and energy calculation are made faster and more memory efficient.
Bug fixes
- A bug when constructing the
Mie
potential with certain parameters is fixed.
v0.13.0
Breaking changes
- The minimum distance argument to
place_atoms
andplace_diatomics
is now the keyword argumentmin_dist
with a default value of no distance.place_diatomics
now places the molecules facing random directions, with the old behaviour available by settingaligned=true
.place_diatomics
now checks for sensible inputs and terminates after a certain number of failed attempts likeplace_atoms
. - The argument order in
apply_coupling!
is switched fromapply_coupling!(system, simulator, coupling)
toapply_coupling!(system, coupling, simulator)
. - The default mass of an
Atom
is changed from0.0u"u"
to1.0u"u"
. - The
AbstractNeighborFinder
abstract type is removed. - The
centre_coords
keyword argument when constructing aSystem
from files is renamed tocenter_coords
. - Center of mass motion is now removed before loggers are run at step zero of a simulation, matching the behaviour during the simulation steps.
Non-breaking changes
visualize
shows the boundary as lines by default and has theshow_boundary
,boundary_linewidth
andboundary_color
keyword arguments added.
New features
- Temperature replica exchange MD (REMD) can now be run in parallel. The
ReplicaSystem
struct is added to act as a container for multipleSystem
s. TheTemperatureREMD
simulator andReplicaExchangeLogger
are added to set up and run replica exchange simulations. TriclinicBoundary
is added and can be used to simulate periodic boundary conditions in a triclinic box. ATriclinicBoundary
can be constructed from either 3 basis vectors or 3 basis vector lengths and angles α/β/γ. Thebox_center
function is added.
Bug fixes
- Coordinates are now moved back inside the boundary before the first step of the simulation.
v0.12.1
- Updates are made to support the latest Zygote.jl and UnitfulChainRules.jl versions.
- A bug in implicit solvent gradient setup is fixed.
v0.12.0
- The
parallel
keyword argument is renamed ton_threads
throughout, allowing an exact number of threads to be specified with the default remainingThreads.nthreads()
. - Arguments for bonded interactions are made more consistent:
HarmonicBond
haskb
renamed tok
andb0
tor0
,HarmonicAngle
hascth
renamed tok
andth0
toθ0
, andMorseBond
hasα
renamed toa
. - An additional type parameter is added to
System
that records whether it is on the GPU. Theis_on_gpu
function is added to access this property. - The
Interaction
abstract type is removed. - The
HarmonicPositionRestraint
interaction for restraining atomic positions, commonly used during equilibration of biomolecular systems, is added.InteractionList1Atoms
andSpecificForce1Atoms
are added to allow the definition of interactions that apply a force to one atom. Theadd_position_restraints
function is added to apply position restraints to aSystem
, along with the atom selector functionsis_any_atom
andis_heavy_atom
. - The
CosineAngle
interaction for the cosine bond angle between three atoms is added. - The
FENEBond
interaction for the finitely extensible non-linear elastic (FENE) bond between two atoms is added. - The
masses
function to access the mass of each atom in aSystem
is added. AndersenThermostat
is made differentiable.DistanceNeighborFinder
andTreeNeighborFinder
now use FLoops.jl and show improved performance on multiple threads.- Inconsistent
System
setup now throws an error. - Equations are added to some docstrings.