diff --git a/CHANGELOG b/CHANGELOG index 890fda39130c2e2ac5defda53110c441920c7461..09b0f2ccde203ba7eb7363725b2b89109987c31b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - add OrderedDict() function to keep input ordered independent to Python version ### Changed -- None +- Add check of length to order and rdf function to replace none with 0 value ### Removed - None diff --git a/main.py b/main.py index ce608f3ff01ee48ff558812f3e3225ab58d43256..6e88e04c5edf742aca5dc2b232145c87caca799c 100644 --- a/main.py +++ b/main.py @@ -301,6 +301,9 @@ for i in GROUPS.keys(): cnt2=cnt2+1 peaks = tbgmx.rdf_peaks(TRR=TRAJ,TPR=TPR,IND=fl,ST=time_index[ST_FR],EN=-1,fld='./'+uniq_id[iidd]['system'],arg1=cnt1,arg2=cnt2,dist_pk=20) rdf_nm=mol1+'-'+mol2+'_rdf_'+uniq_id[iidd]['fld'] + if len(peaks)==0: + peaks.append(0) + rdf_dict[iidd][rdf_nm]=peaks sv_data=rdf_dict mrg_data[i][j]=[rdf_dict,[]] @@ -326,6 +329,8 @@ for i in GROUPS.keys(): yy=tmp tmp=yy order_nm=mol+'_order_'+uniq_id[iidd]['fld'] + if len(yy)==0: + yy.append(0) order_dict[iidd][order_nm]=yy sv_data=order_dict mrg_data[i][j]=[order_dict,[]]