The blDoWritePDBAsPDBML() function outputs a WHOLEPDB structure in pdbml format. As the number of record types included in the output has grown so has the size of the function. Currently, the function has ~930 lines.
Issue 1: Refactoring code.
The function should be refactored into a series of subroutines called by blDoWritePDBAsPDBML() with each subroutine adding a record type (eg CONECT records) to the document.
At this point, all unit tests in the src/TEST directory should pass. (The code has changed but the output hasn't.)
Issue 2: Ordering record types.
The order of the records output by blDoWritePDBAsPDBML() should match the order of the records in pdbml-format files from the Protein Database.
The correct order of records is: ATOM, date, COMPND, SOURCE, pdb id, SEQRES, MODRES, TITLE and CONECT.
When the order of the records is changed, some unit tests in the src/TEST directory will fail and the example pdbml-format output files will have to be edited.
The blDoWritePDBAsPDBML() function outputs a WHOLEPDB structure in pdbml format. As the number of record types included in the output has grown so has the size of the function. Currently, the function has ~930 lines.
Issue 1: Refactoring code.
The function should be refactored into a series of subroutines called by blDoWritePDBAsPDBML() with each subroutine adding a record type (eg CONECT records) to the document.
At this point, all unit tests in the src/TEST directory should pass. (The code has changed but the output hasn't.)
Issue 2: Ordering record types.
The order of the records output by blDoWritePDBAsPDBML() should match the order of the records in pdbml-format files from the Protein Database.
The correct order of records is: ATOM, date, COMPND, SOURCE, pdb id, SEQRES, MODRES, TITLE and CONECT.
When the order of the records is changed, some unit tests in the src/TEST directory will fail and the example pdbml-format output files will have to be edited.