Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crash reading some .cif files with Windows line endings
See https://jira.schrodinger.com/browse/SHARED-7269 in Schrödinger bug tracking. When a .cif file had windows line endings, we weren't treating long cif data values correctly. Basically, we were including the carriage return character in the data value! A .cif long value looks like this: _pdbx_struct_assembly_gen.asym_id_list ;A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,BA,CA,DA,EA,FA,GA,HA,IA,JA,KA,LA,MA,NA,OA,PA,QA,RA,SA,TA,UA,VA,WA,XA,YA,ZA,AB,BB,CB,DB,EB,FB,GB,HB,IB ; where the key is "_pdbx_struct_assembly_gen.asym_id_list" and the value is everything between the semicolons, excluding the final line break. Before this commit, we removed a single linebreak character before the `;`. After this commit, we remove one or two line break characters. This wouldn't show up in typical workflows, because the .cif and .cif.gz files on RCSB use Linux line endings. We only saw this because we unzip the .cif.gz files line by line in one of our tests.
- Loading branch information