Skip to content

Instantly share code, notes, and snippets.

keitaroyam

  • UTokyo / RIKEN SPring-8
Block or report user

Report or block keitaroyam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@keitaroyam
keitaroyam / solvent_fraction.py
Created Sep 9, 2018
calculate solvent fraction from pdb (cctbx)
View solvent_fraction.py
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=" ")
print
@keitaroyam
keitaroyam / check_plane_esd_first_atom_ccp4.py
Created Sep 27, 2016
I just wanted to check if in ccp4 monomer library there is no cif file where dist_esd of the first atom of plane is zero
View check_plane_esd_first_atom_ccp4.py
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:
@keitaroyam
keitaroyam / put_reversephi_info.py
Created Jun 10, 2016
Add reverse-phi information to master h5 file of Eiger
View put_reversephi_info.py
# 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"
You can’t perform that action at this time.