Created
September 27, 2016 10:00
-
-
Save keitaroyam/2c67c305c567be343b5fe918f6a30750 to your computer and use it in GitHub Desktop.
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
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: | |
mon_lib_srv.process_cif(cf) | |
except: | |
print "failed to parse", cf | |
continue | |
print "parsed", cf | |
for k in mon_lib_srv.comp_comp_id_dict: | |
plane_atoms = mon_lib_srv.comp_comp_id_dict[k].plane_atom_list | |
if not plane_atoms: continue | |
tmp = {} | |
for pa in plane_atoms: | |
tmp.setdefault(pa.plane_id, []).append(pa) | |
for pid in tmp: | |
if tmp[pid][0].dist_esd < 0.01: | |
print "=>", k, tmp[pid][0].show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment