File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,16 @@ from sparsehc_dm import sparsehc_dm
8
8
traj_filename= ' traj.nc'
9
9
top_filename= ' top.pdb'
10
10
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)
14
12
15
13
m= sparsehc_dm.InMatrix()
16
14
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]))
20
19
21
- Z= linkage(D, method = ' complete' , preserve_input = False )
20
+ Z= sparsehc_dm. linkage(m, " complete" )
22
21
```
23
22
###Instalation
24
23
####Prerequisites: boost graph and stxxl library
You can’t perform that action at this time.
0 commit comments