Skip to content

Commit abf81b5

Browse files
committed
Fix the mistake in usage example
1 parent fe5cec7 commit abf81b5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ from sparsehc_dm import sparsehc_dm
88
traj_filename='traj.nc'
99
top_filename='top.pdb'
1010

11-
first_frame = md.load_frame(traj_filename, 0,top=top_filename)
12-
atoms_to_keep = [a.index for a in first_frame.topology.atoms if a.name == 'CA']
13-
traj=md.load(traj_filename,top=top_filename, atom_indices=atoms_to_keep)
11+
traj=md.load(traj_filename,top=top_filename)
1412

1513
m=sparsehc_dm.InMatrix()
1614
N=traj.n_frames
17-
for i in range(0,N-1):
18-
rmsds=md.rmsd(traj, traj, i)[i+1:].astype(float)
19-
sparsehc_dm.push(m,rmsds,i)
15+
for i in range(0,Nframes-1):
16+
rmsds=md.rmsd(traj, traj, i)
17+
for j in range(i+1,Nframes):
18+
m.push(i,j,float(rmsds[j]))
2019

21-
Z=linkage(D, method='complete',preserve_input=False)
20+
Z=sparsehc_dm.linkage(m,"complete")
2221
```
2322
###Instalation
2423
####Prerequisites: boost graph and stxxl library

0 commit comments

Comments
 (0)