Skip to content

Instantly share code, notes, and snippets.

@leelasd
Created June 19, 2015 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leelasd/dc258fd084fa802128bc to your computer and use it in GitHub Desktop.
Save leelasd/dc258fd084fa802128bc to your computer and use it in GitHub Desktop.
Static Dielectric Constant from MD_Traj
import numpy as np
import mdtraj as md
from mdtraj.geometry.thermodynamic_properties import *
import mdtraj.utils.unit.unit_definitions as u
temperature=300
traj = md.load('md_prod2.xtc', top='md_prod2.gro')
charge=np.genfromtxt('charges',dtype='f8',usecols=[0])
charges=np.tile(charge,267)
print static_dielectric(traj, charges, temperature)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment