ModSim: The Modularized Python driven MD code to modularize ...

mewstennisSoftware and s/w Development

Nov 4, 2013 (3 years and 8 months ago)

77 views

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.

Main Objectives

Intuitive graphical user interface for easy
configuration of molecular modeling
parameters.

Flexible scripting language to drive the underlying C
library.

Wrapped C structures and functions provide
interface to high level scripting language.

Molecular modeling C library.

Scripting Language

GUI

Interface

C Library

API Hierarchy



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

C Library Functionality

C structures

atom_properties

ff_properties

.

.

.

Python objects

atom_properties


ff_properties

.

.

.

SWIG

C functions

compute_tot_forces()

compute_thermo()

.

.

.

Python functions

compute_tot_forces()


compute_thermo()

.

.

.

SWIG

Library to Scripting Language Mapping

Forces Class Diagram

ForceStretch
ForceBend
ForceTors
ForceInv
ForceBond
ForceVdwShort
ForceCoulShort
ForceShort
ForceVdwLong
ForceCoulLong
ForceLong
ForceNonBond
Force
# 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()


Python script to add force contributions to model

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)










MD Script