Merge pull request #1888 from RosettaCommons/Cyrus/mergetarget
From Steven Lewis:
Cyrus PR: HELIX and SHEET records in PDBs
Many moons ago, @yfsong wrote a code snippet in Cyrus's application to print HELIX and SHEET records in PDB files. It depended on the late, much-abused FileData, so I found myself needing to convert it to StructFileRep. I decided to go ahead and just rewrite all the code into core, into the SFR machinery, instead of handling it unshareably at app level.
You get:
- with PDB output, you can print PDB-formatted HELIX and SHEET records, using the flag -out:file:output_secondary_structure
- SFR contains HELIXInformation and SHEETInformation structs to track the data
- integration test (trivially)
- unit test on both the SFR internals and the string output, checking formatting (note this is bundled as one unit test, because I do not understand the existing structure of the unit tests in this area of Rosetta)
You do not get:
- Rosetta is not reading the records IN, just printing them
- I'm pretty sure having the PDB writer run DSSP breaks some encapsulation rules: the system only works if your code fills the Pose secstruct string somehow (such as DSSPMover)
- TURNs are not recorded, because TURN does not mean loop, and our DSSP does not distinguish beyond H/E/L, so the data are not there to interpret
- SHEET records are actually quite complex because sheets are multiple-element. This code just outputs each single strand as a one-membered sheet, which is sufficient to get viewers like PyMOL and PV displaying secondary structure correctly.
- StructFileRepOptions has an unimplemented provide_XML_schema...I left it that way for now
This will be of interest to @aleaverfay because it's his job to approve and recreate cyrus PRs, and @JWLabonte and @jadolfbr and other chemXRW attendees as it is the SFR I am extending.