This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib | |
import requests | |
def req(query): | |
url = "https://pdbj.org/rest/newweb/search/sql?q=" + urllib.parse.quote(query) | |
raw = urllib.request.urlopen(url).read() | |
return json.loads(raw)["results"] | |
# [(pdb_id, monomer_id), ...] | |
all_mon = req("SELECT distinct pdbid,id FROM chem_comp") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import iotbx.pdb | |
import mmtbx.utils | |
from mmtbx.scaling.matthews import p_vm_calculator | |
def run(pdbin): | |
pdb_inp = iotbx.pdb.input(pdbin) | |
xray_structure = pdb_inp.xray_structure_simple() | |
print "Read from %s" % pdb_in | |
xray_structure.show_summary(prefix=" ") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mmtbx.monomer_library.server | |
from mmtbx import monomer_library | |
import glob | |
import os | |
mon_lib_srv = monomer_library.server.server() | |
cif_files = glob.glob(os.path.join(os.environ["CLIBD_MON"], "*/*.cif")) | |
for cf in cif_files: | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code will be unnecessary when new Eiger firmware offically writes this information | |
import h5py | |
def run(h5in): | |
h5 = h5py.File(h5in, "a") | |
if "/entry/sample/depends_on" not in h5: | |
h5["/entry/sample/depends_on"] = "/entry/sample/transformations/omega" |