Commit 9ece9069 authored by Stelios Karozis's avatar Stelios Karozis

Debug atomid_data function

parent 94aa95b9
...@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.1.0] - 2020-07-31
### Added
- None
### Changed
- In atomid_data function a extra check was added for residue type in order to avoid create dictionaries with empty values in keys
### Removed
- None
## [0.0.9] - 2020-07-30 ## [0.0.9] - 2020-07-30
### Added ### Added
- calculate rdf profile for all combination of molecules - calculate rdf profile for all combination of molecules
......
...@@ -39,7 +39,6 @@ TPR=SYSTEM_NAME+'/eq_run.tpr' ...@@ -39,7 +39,6 @@ TPR=SYSTEM_NAME+'/eq_run.tpr'
# [save, [TYPE], SAVE_NAME]: Save result of previous function, type: pkl, json # [save, [TYPE], SAVE_NAME]: Save result of previous function, type: pkl, json
# #
################################################### ###################################################
#todo save function faulty, save last result to existing pkl(s)
GROUPS={'ALL':['index+ALL_ndx',['save', ['pkl'],'index'],'density',['save', ['pkl'],'dens']], GROUPS={'ALL':['index+ALL_ndx',['save', ['pkl'],'index'],'density',['save', ['pkl'],'dens']],
'HD_GROUP':['surf',['save', ['pkl', 'json'],'surf'],'index+HD_ndx',['save', ['pkl'],'index'],'rdf',['save', ['pkl'],'rdf']], 'HD_GROUP':['surf',['save', ['pkl', 'json'],'surf'],'index+HD_ndx',['save', ['pkl'],'index'],'rdf',['save', ['pkl'],'rdf']],
'TL_GROUP':['vector',['save', ['pkl'],'vec']], 'TL_GROUP':['vector',['save', ['pkl'],'vec']],
......
...@@ -382,6 +382,7 @@ def atomid_data(res_num, res_type, atom_type, atom_num, group={}): ...@@ -382,6 +382,7 @@ def atomid_data(res_num, res_type, atom_type, atom_num, group={}):
and correspond to the atom types in group list and correspond to the atom types in group list
parameters: res_num=[] parameters: res_num=[]
res_type=[]
atom_type=[] atom_type=[]
atom_num=[] atom_num=[]
group={} group={}
...@@ -396,7 +397,7 @@ def atomid_data(res_num, res_type, atom_type, atom_num, group={}): ...@@ -396,7 +397,7 @@ def atomid_data(res_num, res_type, atom_type, atom_num, group={}):
for res,atom in group.items(): for res,atom in group.items():
res_ndx[res]=[] res_ndx[res]=[]
for element in atom: for element in atom:
tmp=[res_num[i].strip() for i, e in enumerate(atom_type) if e.strip() == element.strip()] tmp=[res_num[i].strip() for i, e in enumerate(atom_type) if e.strip() == element.strip() and res.strip()==res_type[i].strip()]
res_ndx[res].append(tmp) res_ndx[res].append(tmp)
#bar.next() #bar.next()
#bar.finish() #bar.finish()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment