-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNative-network.py
More file actions
58 lines (35 loc) · 1.07 KB
/
Native-network.py
File metadata and controls
58 lines (35 loc) · 1.07 KB
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
55
56
57
58
import pymol
from pymol import cmd
import sys,os
def nat(pdbid,chainid):
cmd.view('v', 'store');
object = cmd.get_names()[0]
cmd.fetch(pdbid)
cmd.select("design_nat","%s and chain %s"%(object,"B"))
cmd.select("native_nat","%s and chain %s"%(pdbid,chainid))
cmd.select("other_nat","%s and not chain %s"%(pdbid,chainid))
cmd.hide("everything","other")
cmd.hide('(resn HOH)')
cmd.super("design_nat","native_nat")
cmd.select("none")
cmd.orient(object)
cmd.system("rm %s.pdb"%(pdbid));
cmd.view('v', 'recall')
cmd.extend("nat",nat)
def na():
cmd.view('v', 'store');
object = cmd.get_names()[0]
pdbid = object[0:4]
chainid = object[4:5]
cmd.fetch(pdbid)
cmd.select("design_na","%s and chain %s"%(object,"B"))
cmd.select("native_na","%s and chain %s"%(pdbid,chainid))
cmd.select("other_na","%s and not chain %s"%(pdbid,chainid))
cmd.hide("everything","other")
cmd.hide('(resn HOH)')
cmd.super("design_na","native_na")
cmd.select("none")
cmd.orient(object)
cmd.system("rm %s.pdb"%(pdbid));
cmd.view('v', 'recall')
cmd.extend("na",na)