nelse003 / exhaustive_search

Testing exhaustive search algorithms for crystallographic occupancy refinement and surrounding problems
0 stars 0 forks source link

Code fails @ NUDT7A -x1746 #21

Closed nelse003 closed 6 years ago

nelse003 commented 6 years ago

Logging

#############################################

NUDT7A-x1746: running exhaustive search

############################################# INFO:exhaustive_search:Processing input PDB and reflection files. Parse into xray structure, fmodel and hierarchies INFO:exhaustive_search:PDB name/dls/labxchem/data/2017/lb18145-49/processing/analysis/initial_model/NUDT7A-x1746/Refine_0001/refine_1.pdb INFO:exhaustive_search:Extract Fobs and free-r flags INFO:exhaustive_search:Define map grididng INFO:exhaustive_search:Define fmodel INFO:exhaustive_search:r_work: 0.169862504293 r_free: 0.209338433422 INFO:exhaustive_search:Organising output directory INFO:select_occupancy_groups:Process pdb file to get bound and ground states. INFO:select_occupancy_groups:Looking for ligands with resname DRG or FRG or LIG or UNK or UNL INFO:select_occupancy_groups:The residues defined in the occupancy group have atlocs: {(' 60', 'B'): set(['A', 'B']), (' 73', 'A'): set(['A', 'C', 'B', 'D']), (' 40', 'B'): set(['A', 'B']), (' 30', 'B'): set(['A', 'B']), (' 54', 'B'): set(['A', 'B']), (' 93', 'B'): set(['A', 'B']), (' 11', 'B'): set(['A', 'B']), (' 3', 'B'): set(['A', 'B']), (' 1', 'E'): set(['C', 'D']), (' 20', 'B'): set(['A', 'B']), (' 189', 'B'): set(['A', 'B']), (' 151', 'B'): set(['A', 'B']), (' 33', 'B'): set(['A', 'B']), (' 133', 'B'): set(['A', 'B']), (' 51', 'B'): set(['A', 'B']), (' 196', 'B'): set(['A', 'B'])} INFO:select_occupancy_groups:Get altlocs groups that are coincident, in format[(altloc_group,residue,chain),(altloc_group,residue,chain)...] DEBUG:select_occupancy_groups:Coincident: [(('A', 'C'), ' 73', 'A'), (('A', 'B'), ' 40', 'B'), (('A', 'B'), ' 30', 'B'), (('A', 'B'), ' 54', 'B'), (('A', 'B'), ' 93', 'B'), (('A', 'B'), ' 3', 'B'), (('A', 'B'), ' 20', 'B'), (('A', 'B'), ' 189', 'B'), (('A', 'B'), ' 151', 'B'), (('A', 'B'), ' 33', 'B'), (('A', 'B'), ' 133', 'B'), (('A', 'B'), ' 51', 'B'), (('A', 'B'), ' 196', 'B')] DEBUG:select_occupancy_groups:Resnames: ['DRG', 'FRG', 'LIG', 'UNK', 'UNL'] DEBUG:select_occupancy_groups:Lig altlocs: set(['C', 'D']) DEBUG:select_occupancy_groups:Lig chain: set(['E']) DEBUG:select_occupancy_groups:coincident: [(('A', 'C'), ' 73', 'A'), (('A', 'B'), ' 40', 'B'), (('A', 'B'), ' 30', 'B'), (('A', 'B'), ' 54', 'B'), (('A', 'B'), ' 93', 'B'), (('A', 'B'), ' 3', 'B'), (('A', 'B'), ' 20', 'B'), (('A', 'B'), ' 189', 'B'), (('A', 'B'), ' 151', 'B'), (('A', 'B'), ' 33', 'B'), (('A', 'B'), ' 133', 'B'), (('A', 'B'), ' 51', 'B'), (('A', 'B'), ' 196', 'B')] DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'C'), ' 73', 'A') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 40', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 30', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 54', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 93', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 3', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 20', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 189', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 151', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 33', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 133', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 51', 'B') DEBUG:select_occupancy_groups:Coinicident altloc group: (('A', 'B'), ' 196', 'B') INFO:select_occupancy_groups:Given coincident altloc groups return a split between ground and bound state For altloc groups that follow the ligand i.e LIG altloc C and LIG altloc D are coincident, then if RES 121 [(A,B) ,(C,D)], set (C,D) as bound state and (A,B) as ground state

DEBUG:select_occupancy_groups:Lig altloc group: None DEBUG:select_occupancy_groups:(('A', 'C'), ' 73', 'A')

Stdout

Traceback (most recent call last): File "/dls/science/groups/i04-1/elliot-dev/Work/exhaustive_search/Repeating_exhaustive_search.py", line 213, in run_default(run=run, master_phil=master_phil, args=sys.argv[1:], blank_arg_prepend=blank_arg_prepend) File "/dls/science/groups/i04-1/software/pandda-update/ccp4/ccp4-7.0/lib/python2.7/site-packages/panddas-0.2.12_dev-py2.7.egg/giant/jiffies/init.py", line 16, in init out = run(params=working_phil.extract()) File "/dls/science/groups/i04-1/elliot-dev/Work/exhaustive_search/Repeating_exhaustive_search.py", line 142, in run exhaustive_search(args, xtal_name) File "/dls/science/groups/i04-1/elliot-dev/Work/exhaustive_search/exhaustive_search.py", line 404, in run pdb = pdb) File "/dls/science/groups/i04-1/elliot-dev/Work/exhaustive_search/exhaustive_search.py", line 188, in calculate_mean_fofc bound_states, ground_states = process_refined_pdb_bound_ground_states(pdb) File "/dls/science/groups/i04-1/elliot-dev/Work/exhaustive_search/select_occupancy_groups.py", line 523, in process_refined_pdb_bound_ground_states bound_states, ground_states = get_state_selection(hier, largest_coincident, occupancy_groups, params) File "/dls/science/groups/i04-1/elliot-dev/Work/exhaustive_search/select_occupancy_groups.py", line 329, in get_state_selection if list(all_altlocs.difference(lig_altloc_group)) == list(coincident_altloc_group[0]): TypeError: 'NoneType' object is not iterable

nelse003 commented 6 years ago

Added:


    # If no matching coinicdent cases have been made return just the ligand altlocs
    return tuple(lig_altlocs)

to the end of

get_ligand_coincident_altloc_group(hier, coincident, params)

This means code now works, but plot has high |fo-fc| values. Further investigation may be needed, for now closing the issue.