Skip to content

ff file sanitising#739

Merged
pckroon merged 7 commits intomasterfrom
ff-file-sanitising
Oct 29, 2025
Merged

ff file sanitising#739
pckroon merged 7 commits intomasterfrom
ff-file-sanitising

Conversation

@csbrasnett
Copy link
Copy Markdown
Collaborator

@csbrasnett csbrasnett commented Oct 24, 2025

addresses #720 with the hope that combining various martini3 force fields into a single one will help user confusion.

This PR firstly merges the Martini3-IDP force field into martini3001, and deletes the martini30b32 and martini30dev force fields.

Secondly, we split out the links and idr-specific links from aminoacids.ff in martini3001 so that these can be managed more easily in future.

2 integration tests needed updating. tier-1: lysozyme used the removed martini30b32 force field, and tier-1: hst5 used the old idp parameters from GoMartini.

the final thing to check here is the readthedocs in case there is now outdated information about idr parameters, and a blog post for the website

csbrasnett and others added 3 commits October 17, 2025 15:29
- tier-1-lysozyme used an old and now removed force field
- tier-1-hst5 used the old gomartini idp parameters, which are not used in favour of martini3-idp parameters.
@csbrasnett
Copy link
Copy Markdown
Collaborator Author

This is failing the integration test for his5 because the idp force field has a BB-BB link of a slightly different force constant, that for some reason I didn't generate in the reference (and hence I could get the tests to pass) but is picked up in the integration test here:

in links.ff:

;; Links for COIL. We apply them first as coil is the default.
[ link ]
resname $protein_resnames
[ bonds ]
; (Modified by Paulo)
BB +BB 1 0.350 4000 {"group": "Backbone bonds"}

in idr_links.ff:

;; Bond for IDR.
[ link ]
resname $protein_resnames_non_pro
cgidr true
[ features ]
idr
[ bonds ]
BB +BB 1 0.360 8000 {"group": "Backbone bonds IDP", "comment": "BB-BB IDR"}

I guess there needs to be some way of prioritising it, or annotating the first link as a not IDR

@pckroon
Copy link
Copy Markdown
Member

pckroon commented Oct 28, 2025

IIRC the last link to apply has priority, so simply make sure the IDR link is below the regular one.

@csbrasnett
Copy link
Copy Markdown
Collaborator Author

ok, turns out why it managed to pass locally but not otherwise is because we don't currently sort ff files while parsing them, and glob returns an unsorted order when gathering them before doing so. So, now we sort the order and the files are named appropriately so that the IDR links are after the standard ones. I've also made some small annotation tweaks that help ensure the IDR links fully overwrite standard ones when found.

Copy link
Copy Markdown
Member

@pckroon pckroon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Some minor comments.
I assume you checked the resulting changes in the test outputs?

"""
source_files = iter_force_field_files(directory)
for source in source_files:
for source in sorted(source_files):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good idea :)
Could you rename ff files for which the order matters by prefixing them with a number? e.g. 10-aminoacids.ff, 20-links_M3.ff, and 30-links_M3_IDR.ff. That way the ordering is super explicit.

-cys auto
-dssp
-ignore HOH
-ef 500 No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did the -ef 500 get removed here? The goal of these tests is not just to generate valid topology files

Copy link
Copy Markdown
Member

@pckroon pckroon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!
Does 5-aminoacids.ff sort before or after 15-links_M3.ff? I actually guess after ;)
Best to left-pad zeroes -> 05-aminoacids.ff

Copy link
Copy Markdown
Member

@pckroon pckroon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, thanks!

@pckroon pckroon merged commit a3037bc into master Oct 29, 2025
10 checks passed
@pckroon pckroon deleted the ff-file-sanitising branch October 29, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants