Closed pckroon closed 1 year ago
With the last commit the following should be possible. I gave it a quick test, but I probably missed some edge cases...
;; Cystein bridge
[ link ]
resname "CYS"
[ constraints ]
SC1 >SC1 1 0.24 {"comment": "Disulfide bridge"}
[ features ]
disulfide
[ info ]
Added a disulfide bridge between {SC1[chain]}-{SC1[resname]}{SC1[resid]} and {>SC1[chain]}-{>SC1[resname]}{>SC1[resid]}.
Ditto for Blocks and Modifications. During the formatting SC1 and >SC1 in the example above are replaced by the corresponding dictionaries with node attributes.
Overall looks good to me. Have a look at the two small comments I made. One question that came to my mind. Would it be good/needed to have force-field wide log statements and warnings. Like for example "You choose Martini2, are you sure cuz it sucks for protein interactions?"
I played around with this, but I'm running into limitations of the SectionLineParser. So good idea, but no.
@pckroon what is the status of this one?
Ready as far as I'm concerned. The log statements at FF level we can leave for later I think.
How about the test coverage? Do you care to fix it?
Honestly not really. If this feature turns out to not work perfectly it's not too big a deal.
@pckroon is there a way to line-break a warning ? Just using two lines scrambles the print output
No, there isn't. Multiline statements are something for the parser overhaul as far as I'm concerned. For now just make long lines.
@pckroon I'm in principle fine with this PR. Seems to work. Except I wonder if it is a good idea to print the log statements in the end or actually where the processor is called?
Printing them in the end makes deduplication possible/much easier. Also, at the end they're more likely to be noticed I guess.
@pckroon I'm fine with merging this. I want to adopt it to polypyl asap as well
This PR adds the option to have martinize2 generate log statements based on .ff files. Blocks, Modifications and Links get debug, info, warning, and error sections, in which each line will become a log statement with the appropriate level. This is still WIP, since I kind of want to be able to do e.g.
but I'm not quite sure yet how painful that's going to be (shouldn't be too bad though,
format
will do the heavy lifting). Does require some bookkeeping .Question, should each line in a section result in a separate log message, or should these be aggregated to a single entry?