Skip to content

Releases: JuliaMolSim/Molly.jl

v0.17.0

09 Jul 15:05
Compare
Choose a tag to compare

Breaking changes

  • run_loggers is no longer available as a keyword argument to SteepestDescentMinimizer and log_states is no longer available as a keyword argument when calling simulate! with MetropolisMonteCarlo. Instead run_loggers can be given as a keyword argument to simulate! 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.jl Crystal struct.
  • A convenience constructor is added for System allowing an existing System to be copied with given properties changed.
  • run_loggers can be given as a keyword argument to simulate! to determine whether the loggers are run. The options are true, false or :skipzero, in which case the loggers are not run before the first step. run_loggers is true by default except for SteepestDescentMinimizer, where it is false. run_loggers! now has a fourth argument which determines whether the loggers are run, default true.
  • The scale factor given to scale_coords! can now be a SVector 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

12 May 22:36
Compare
Choose a tag to compare

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 and Langevin 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 and pressure. Corresponding loggers are added as VirialLogger and PressureLogger.
  • The scale_boundary, scale_coords! and molecule_centers functions are added.
  • The topology keyword argument for System can provide information about which atoms are in the same molecule, with this information stored as a MolecularTopology when reading a System from a file. The corresponding keyword arguments topology and replica_topology are added to ReplicaSystem.
  • Multiple couplers can be given to the coupling argument of compatible simulators as a Tuple or a NamedTuple. 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 the System constructor from files.
  • Unitful.ustrip is now defined for CubicBoundary and RectangularBoundary.

v0.15.0

19 Apr 17:00
Compare
Choose a tag to compare

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 a use_neighbors function, which accesses a use_neighbors field of the struct for built-in interactions. Custom pairwise interactions can define a method for this function, which returns false by default.
  • The weight_14 field of pairwise interactions has been renamed to weight_special and the weight_14 argument to force has been renamed to special. The nb_matrix and matrix_14 fields of neighbor finders have been renamed to eligible and special respectively.
  • OpenMMForceField, OpenMMResidueType and OpenMMAtomType are renamed to MolecularForceField, ResidueType and AtomType 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 to random_velocity and rand_coord is renamed to random_coord.
  • DistanceVecNeighborFinder and NeighborListVec are removed since DistanceNeighborFinder and NeighborList now work on the GPU and with automatic differentiation.
  • The gpu_diff_safe argument is no longer available when setting up a System since the CPU path is now differentiable. is_gpu_diff_safe is removed.
  • The type parameters of System, ReplicaSystem, DistanceNeighborFinder and NeighborList are changed.
  • The @fastmath macro is no longer used in the package.

Non-breaking changes

  • DistanceNeighborFinder and TreeNeighborFinder now return lists of neighboring pairs in ascending order of index.

New features

  • The Nosé-Hoover simulator is added as NoseHoover.
  • potential_energy and total_energy are now compatible with automatic differentiation on CPU and GPU. They can also now be run in parallel using the n_threads keyword argument, with this being the default behaviour.
  • CubicBoundary and RectangularBoundary 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 and rename_terminal_res keyword arguments are available as arguments when constructing a System 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 and MOLLY_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

24 Mar 11:54
Compare
Choose a tag to compare

Bug fixes

  • A bug introduced by a new version of ForwardDiff.jl is fixed.

v0.14.2

15 Feb 18:44
Compare
Choose a tag to compare

New features

  • The Müller-Brown potential is added as MullerBrown.

v0.14.1

03 Jan 17:19
Compare
Choose a tag to compare

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 from AtomsBase.atomic_symbol.
  • A bug in the export of OpenMMResidueType is fixed.

v0.14.0

15 Dec 17:22
Compare
Choose a tag to compare

Breaking changes

  • The type parameters and fields of System, ReplicaSystem, ImplicitSolventOBC and ImplicitSolventGBN2 are changed.
  • The type parameters of TemperatureREMD are changed.

Non-breaking changes

  • The mass function falls back to accessing the mass 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! and random_normal_translation! are added to generate trial moves.
  • HamiltonianREMD is added to allow REMD with different interactions for each replica. remd_exchange! and simulate_remd! are added to allow custom REMD simulators to be defined by giving the exchange function. replica_pairwise_inters, replica_specific_inter_lists and replica_general_inters can now be given when constructing a ReplicaSystem to allow different interactions for each replica.
  • Soft core versions of the Lennard-Jones and Coulomb interactions are added as LennardJonesSoftCore and CoulombSoftCore.
  • Preliminary support for bonded constraints using the SHAKE algorithm is added via SHAKE and apply_constraints!. constraints can be used to define the constraints when constructing a System, with corresponding arguments for a ReplicaSystem. 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

10 Aug 14:42
Compare
Choose a tag to compare

Breaking changes

  • The minimum distance argument to place_atoms and place_diatomics is now the keyword argument min_dist with a default value of no distance. place_diatomics now places the molecules facing random directions, with the old behaviour available by setting aligned=true. place_diatomics now checks for sensible inputs and terminates after a certain number of failed attempts like place_atoms.
  • The argument order in apply_coupling! is switched from apply_coupling!(system, simulator, coupling) to apply_coupling!(system, coupling, simulator).
  • The default mass of an Atom is changed from 0.0u"u" to 1.0u"u".
  • The AbstractNeighborFinder abstract type is removed.
  • The centre_coords keyword argument when constructing a System from files is renamed to center_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 the show_boundary, boundary_linewidth and boundary_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 multiple Systems. The TemperatureREMD simulator and ReplicaExchangeLogger 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. A TriclinicBoundary can be constructed from either 3 basis vectors or 3 basis vector lengths and angles α/β/γ. The box_center function is added.

Bug fixes

  • Coordinates are now moved back inside the boundary before the first step of the simulation.

v0.12.1

01 Aug 14:51
Compare
Choose a tag to compare
  • 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

21 Jul 15:26
Compare
Choose a tag to compare
  • The parallel keyword argument is renamed to n_threads throughout, allowing an exact number of threads to be specified with the default remaining Threads.nthreads().
  • Arguments for bonded interactions are made more consistent: HarmonicBond has kb renamed to k and b0 to r0, HarmonicAngle has cth renamed to k and th0 to θ0, and MorseBond has α renamed to a.
  • An additional type parameter is added to System that records whether it is on the GPU. The is_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 and SpecificForce1Atoms are added to allow the definition of interactions that apply a force to one atom. The add_position_restraints function is added to apply position restraints to a System, along with the atom selector functions is_any_atom and is_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 a System is added.
  • AndersenThermostat is made differentiable.
  • DistanceNeighborFinder and TreeNeighborFinder now use FLoops.jl and show improved performance on multiple threads.
  • Inconsistent System setup now throws an error.
  • Equations are added to some docstrings.