-
Notifications
You must be signed in to change notification settings - Fork 0
/
find_crystal_contacts.py
56 lines (32 loc) · 1.49 KB
/
find_crystal_contacts.py
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/env python
#!/usr/bin/python2
# Script for finding complexes where the ligand is close to crystal contacts
#
import sys
sys.path.append('/local/chresten/pKa/trunk/pKarun')
import WHAT_IF
import os
import sys
import math
from read_write_files import *
def generate_crystal_contacts_shell_old(id):
command='getmol '+id+'\nY\n\n\n %SOUSHL\n %makmol\n\n cryst_'+id+'.pdb\n\n tot 0\n\n'
x=WHAT_IF.Whatif()
x.RedirectOutput('cryst_%s.log'%id)
x.Run(command,'log_%s.log'%id)
return
def generate_crystal_contacts_shell(id):
command='setwif 1052 0\n\ngetmol '+id+'\nY\n\n\n %delwat\n %SOUSHL\n \n %makmol\n\n cryst_'+id+'.pdb\n\n tot 0\n\n'
x=WHAT_IF.Whatif()
x.RedirectOutput('cryst_%s.log'%id)
x.Run(command,'log_%s.log'%id)
return # the above two commands will be used to obtain...
# the orig. pdb file + crystal contacts complex
def generate_crystal_contacts_shell_from_file(filename):
command='getmol '+filename+'\n\n\n %delwat\n %dellig\n %SOUSHL\n \n %makmol\n\n cryst_'+filename[-8:-4]+'.pdb\n\n tot 0\n\n'
print command
x=WHAT_IF.Whatif()
x.RedirectOutput('cryst_%s.log'%filename[-8:-4])
x.Run(command,'log_%s.log'%filename[-8:-4])
return # the above two commands will be used to obtain...
# the orig. pdb file + crystal contacts complex