Transcript Document

Main Objectives
To create a flexible, extensible and reusable molecular
modeling environment.
• Construction of a library for molecular modeling using a common
data model and implemented in C for efficiency.
• Flexibility is achieved through the combination of a modular
underlying library and a high level scripting language.
• Development of the interface between the molecular modeling
library and the high level scripting language is facilitated by
software tools (SWIG) which allow for rapid prototyping.
API Hierarchy
GUI
Scripting Language
Intuitive graphical user interface for easy
configuration of molecular modeling
parameters.
Flexible scripting language to drive the underlying C
library.
Interface
Wrapped C structures and functions provide
interface to high level scripting language.
C Library
Molecular modeling C library.
C Library Functionality
•
Molecular model:
- stretching: Harmonic, Morse
- bending: Harmonic, q-harmonic, cross stretch-bending
- torsion: Fourier, cross bend-bend, stretch-stretch
- inversion: Umbrella and improper torsions
- van der Waals: LJ, exp-6, Morse, WCA
- Hydrogen-bonding
• Methods:
- Short-range nonbonded vdw/Coulombic/H-bonding with an all pair search, cell lists,
neighbor lists.
- Long-range Coulombic with Ewald, PME.
- Integrator: Velocity-verlet, Multiple time steps
- Thermostat: Berendsen, Nose-Hoover
- Barostat: Berendsen
Library to Scripting Language Mapping
C structures
atom_properties
Python objects
SWIG
ff_properties
.
.
.
ff_properties
.
.
.
C functions
compute_tot_forces()
compute_thermo()
.
.
.
atom_properties
Python functions
SWIG
compute_tot_forces()
compute_thermo()
.
.
.
Forces Class Diagram
Force
ForceBond
ForceStretch
ForceBend
ForceTors
ForceNonBond
ForceInv
ForceShort
ForceVdwShort
ForceCoulShort
Python script to add force contributions to model
# Initialize and add force contributions
forceStretch = ForceStretch(model)
model.add_force(forceStretch)
forceBend = ForceBend(model)
model.add_force(forceBend)
forceTors = ForceTors(model)
model.add_force(forceTors)
forceCoulShort = ForceCoulShort(model, coul_short_method)
model.add_force(forceCoulShort)
forceCoulLong = ForceCoulLong(model, coul_long_method)
model.add_force(forceCoulLong)
# Iterate over force contributions to calculate total force.
for force in self.force_list:
force.compute_force()
ForceLong
ForceVdwLong
ForceCoulLong
MD Script
parameters = setup_parameters(default_file_path,
run_file_path)
model = Model(parameters)
setup_forces(parameters, model)
# sample the velocities
sample_velocities(model.parameters,
model.atom_properties)
# run the md loop
for i in range(1, parameters.n_steps+1):
# integrate
velocity_verlet(model)
model.compute_thermo()
berendsen_thermostat(parameters,
model.atom_properties,
model.thermo_properties)