Expected behavior
If a_name, c_name etc. arguments are passed as residue names in class initialization, they should be recognized as whole during the analysis, and not assumed to be single-letter.
Actual behavior
Everything except the first letter of the residuename from the groups passed in input is discarded.
Code to reproduce the behavior
from MDAnalysis.analysis import nucleicacids
wcdist = nucleicacids.WatsonCrickDist(listA, listB,
a_name='DA',
c_name='DC',
g_name='DG',
t_name='DT' )
....
My MD for some reasons use this DA DC etc names. for nucleic residues.
Current version of MDAnalysis
MDAnalysis 2.10 on Python 3.13
Proposed solution
In my opinion it should be safe to change resname[0] in resname in lines:
|
if pair[0].resname[0] in pyrimidines: |
|
elif pair[0].resname[0] in purines: |
Expected behavior
If
a_name,c_nameetc. arguments are passed as residue names in class initialization, they should be recognized as whole during the analysis, and not assumed to be single-letter.Actual behavior
Everything except the first letter of the residuename from the groups passed in input is discarded.
Code to reproduce the behavior
My MD for some reasons use this
DADCetc names. for nucleic residues.Current version of MDAnalysis
MDAnalysis 2.10 on Python 3.13
Proposed solution
In my opinion it should be safe to change
resname[0]inresnamein lines:mdanalysis/package/MDAnalysis/analysis/nucleicacids.py
Line 266 in 3be9117
mdanalysis/package/MDAnalysis/analysis/nucleicacids.py
Line 268 in 3be9117