In [18]:
from plumology import vis, util, io
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
In [6]:
data = io.read_plumed('data.dat')
In [7]:
data.head()
Out[7]:
We can also specify certain columns using regular expressions, and also specify the stepping:
In [10]:
data = io.read_plumed('data.dat', columns=[r'p.i\d', 'peplen'], step=10)
In [11]:
data.head()
Out[11]:
Lets read some MetaD hills files:
In [13]:
hills = io.read_all_hills(['HILLS.0', 'HILLS.1'])
The separate files are horizontally concatenated into one dataframe:
In [14]:
hills.head()
Out[14]:
In [15]:
dist, ranges = util.dist1D(data, nbins=50)
In [19]:
_ = vis.dist1D(dist, ranges)
We also have a SketchMap representation of our trajectory and can visualize it as a free-energy surface:
In [30]:
sm_data = io.read_plumed('colvar-red1.dat')
We should probably clip it to a reasonable range first:
In [27]:
clipped_data = util.clip(sm_data, ranges={'cv1': (-50, 50), 'cv2': (-50, 50)})
In [28]:
edges = util.dist1D(clipped_data, ret='edges')
dist = util.dist2D(clipped_data, nbins=50, weight_name='ww')
fes = util.free_energy(dist, kbt=2.49)
In [29]:
_ = vis.dist2D(fes, edges)