Introduction

Usage

This package incorporates a Fluctuating Density based model for MD simulations performed with OpenMM. Similar to a fluctuating charge model, this model incorporates explicit polarization into a simulation by adjusting the density sites at each time step so that the electrostatic energy is minimized. Additionally, The forces incorporated here uses atom centered monopole densities, described by Slater functions for the electrons and point-particles for the nuclei, to incorporate effects of electron overlap between atomic sites.

This model replaces the nonbonded interactions for RNA nucleobases only. Everything else that is simulated in an OpenMM system remains the same. In order to construct a simple, traditional openmm simulation, one may write a simple python script as follows (from their user guide: http://docs.openmm.org/latest/userguide/application/02_running_sims.html)

 1from openmm.app import *
 2from openmm import *
 3from openmm.unit import *
 4from sys import stdout
 5
 6pdb = PDBFile('input.pdb')
 7forcefield = ForceField('amber14-all.xml', 'amber14/tip3pfb.xml')
 8system = forcefield.createSystem(pdb.topology, nonbondedMethod=PME,
 9        nonbondedCutoff=1*nanometer, constraints=HBonds)
10integrator = LangevinMiddleIntegrator(300*kelvin, 1/picosecond, 0.004*picoseconds)
11simulation = Simulation(pdb.topology, system, integrator)
12simulation.context.setPositions(pdb.positions)
13simulation.minimizeEnergy()
14simulation.reporters.append(PDBReporter('output.pdb', 1000))
15simulation.reporters.append(StateDataReporter(stdout, 1000, step=True,
16        potentialEnergy=True, temperature=True))
17simulation.step(10000)

To enabme AmberFD forces, a similar python script can be use with very minor adjustments:

 1    from openmm.app import *
 2    from openmm import *
 3    from openmm.unit import *
 4    from sys import stdout
 5    from AmberFD.AmberFD import MoleculeImporter, AmberFDSimulation
 6
 7    ### AmberFD Handles forcefield assignment and importing structres
 8    pdb = MoleculeImporter('input.pdb', ('AmberFD.xml', 'amber14/tip3pfb.xml'), onbondedMethod=PME,
 9            nonbondedCutoff=1*nanometer, constraints=HBonds)
10    integrator = LangevinMiddleIntegrator(300*kelvin, 1/picosecond, 0.004*picoseconds)
11    simulation = AmberFDSimulation(pdb.topology, system, integrator)   ### Similar to Simulation(), but enables AmberFD forces
12    simulation.context.setPositions(pdb.positions)
13    simulation.minimizeEnergy()
14    simulation.reporters.append(PDBReporter('output.pdb', 1000))
15    simulation.reporters.append(StateDataReporter(stdout, 1000, step=True,
16            potentialEnergy=True, temperature=True))
17    simulation.step(10000)

Installation

Requirements

AmberFD has been tested using the following libraries and packages:

  • CMake 3.16.4

  • g++ 7.5.0

  • Python 3.9.0

  • LAPACK 3.9.0

  • OpenMP 4.5

  • SWIG 4.0.1

AmberFD does the heavy lifting as a compiled C++ Library, while the API is mostly designed to be used for Python. A majority of this Python code is autogenerated using SWIG. Additionally, fluctuating density forces are parallelized with OpenMP, but it’s performance has only been moderately benchmarked.

Compilation

First, in a console, change to the directory that you downloaded AmberFD

$ cd <AmberFD_Folder>

Next, create a directory called build to compile the libraries in, and change to that directory

mkdir build
cd build

Call CMake to perform the precompilation checks to make sure you have all the required packages

$ cmake ../

If this passes, you can then procede to compile the code. Simply type

$ make

Finally, make sure that everything was put together as it should,

$ make test

For the meantime, there is no install step (working on it!). In your python code, either install the generated _AmberFD.py and libAmberFD.a library yourself in a convienient location, or add

sys.path.insert(1, '/path/to/AmberFD/build/')

to your Python import statements.