-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheck_openmm_len.py
More file actions
executable file
·37 lines (27 loc) · 871 Bytes
/
check_openmm_len.py
File metadata and controls
executable file
·37 lines (27 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python
# encoding: utf-8
import glob
import itertools
import subprocess
import os
import prody
from zam import protein
import numpy
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
def main():
pdb_ids = [pdb.strip() for pdb in open('proteins.txt').readlines()]
for pdb_id in pdb_ids:
print 'processing {}'.format(pdb_id)
# load the system as setup
p = protein.Protein(os.path.join('FixedOpenMM', pdb_id + '.pdb'))
# get one of the rosetta models
r = protein.Protein(glob.glob(os.path.join('final_dataset', pdb_id, 'S_*.pdb'))[0])
print ' system: {}'.format(len(p))
print ' rosetta: {}'.format(len(r))
if not len(p) == len(r):
print ' WARNING: Lengths do not match!'
print
if __name__ == '__main__':
main()