-
Notifications
You must be signed in to change notification settings - Fork 41
Membrane support #1561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Membrane support #1561
Changes from 152 commits
4e6617e
ac9862a
8ea145a
587a1bf
b7c63d6
24f3d58
617ac8c
7fd5ca9
18db828
1ee6fd7
238b36b
6945805
646ebbe
abf0007
96fa49a
b70e5b2
481ff35
4d28281
eff1958
1456a99
0cdde55
5bfd1c9
ce29130
c53fd60
5c313b1
9dce0e0
080d93e
48a7844
b492de0
2913994
e654a4d
1e707ba
bf51b0c
872c914
27d15f7
508fa62
a33d882
7a640ce
44e3545
6e4023d
339a9ed
741e44c
e53512b
e67ecd2
1f408fc
19761df
5d5bc8e
3e6b063
4d7da11
4c7cdd4
0962f3c
00c606e
b317cab
d97de53
2145f37
fc61675
b132806
88c9179
379cdf6
d79eb36
207fe3c
3504100
af99e37
c309957
9ae0565
4156c55
4327ef1
ff06372
3cd7793
8c00e32
5dd1758
11602f5
7ac6d32
45c26de
7dc626c
621b0d7
a42653e
825e8ae
919cacf
683b47d
21615c8
45f48e0
d3c4711
efdb5f1
5f6816c
b7f021d
cfdaf04
e35690c
5a9f873
31f9227
a2ab353
8ff8d45
39e62ca
71c8a99
edd0e5d
e23d2a2
1936b83
cafa04a
ec2beaa
a0a2ad1
6a3a5a3
0996c33
df381f9
54986e8
14e162e
a0b3c91
30218d2
5273d43
962dea5
c9b75b9
5eebbbc
8b53130
93b4cb7
481c0e9
32c4a5e
4586c5b
8b8529c
ede10d3
69d0986
40b87ec
ff2fec9
d7e4255
58a004d
0039bbe
5cfbc61
02ce210
3450d2c
78b266c
24cb6d3
df4ca99
9f67fbf
3ec132d
eddd3d2
c2feb33
de778de
39793ea
db4ba21
2eaa4a1
775b619
949eaeb
20fcd05
a31527c
d8d8051
33e2694
ff5c0c3
e9187fd
93e9d54
db0bc3e
676f4c6
20dbdf9
1720e00
8652214
db33dd2
a148ae8
201d9fa
22bdbe4
a9dae30
f30578e
f12d806
1af9cc6
7254ee7
13786db
31e4d72
d6f4fc4
e8b1e29
99d1258
eba6282
d7468b6
6e848d8
c228e52
d715d11
c798e58
c2a6467
375e26b
028e442
a72e135
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -470,9 +470,12 @@ def _check_and_store_system_forces(self): | |
|
|
||
| def _check_unknown_forces(forces, system_name): | ||
| # TODO: double check that CMMotionRemover is ok being here | ||
| known_forces = {'HarmonicBondForce', 'HarmonicAngleForce', | ||
| 'PeriodicTorsionForce', 'NonbondedForce', | ||
| 'MonteCarloBarostat', 'CMMotionRemover', 'CMAPTorsionForce'} | ||
| known_forces = { | ||
| 'HarmonicBondForce', 'HarmonicAngleForce', | ||
| 'PeriodicTorsionForce', 'NonbondedForce', | ||
| 'MonteCarloBarostat', 'CMMotionRemover', | ||
| 'CMAPTorsionForce', 'MonteCarloMembraneBarostat', | ||
| } | ||
|
|
||
| force_names = forces.keys() | ||
| unknown_forces = set(force_names) - set(known_forces) | ||
|
|
@@ -548,10 +551,17 @@ def _handle_box(self): | |
| """ | ||
| # Check that if there is a barostat in the old system, | ||
| # it is added to the hybrid system | ||
| if "MonteCarloBarostat" in self._old_system_forces.keys(): | ||
| present_barostat = [ | ||
| i for i in self._old_system_forces.keys() | ||
| if i in ["MonteCarloBarostat", "MonteCarloMembraneBarostat"] | ||
| ] | ||
| if len(present_barostat) == 1: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens otherwise? Throw an error?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Throwing an error now if there are more than one barostat. |
||
| barostat = copy.deepcopy( | ||
| self._old_system_forces["MonteCarloBarostat"]) | ||
| self._old_system_forces[present_barostat[0]]) | ||
| self._hybrid_system.addForce(barostat) | ||
| if len(present_barostat) > 1: | ||
| errmsg = "More than 1 barostat are present which is not supported" | ||
| raise ValueError(errmsg) | ||
|
|
||
| # Copy over the box vectors from the old system | ||
| box_vectors = self._old_system.getDefaultPeriodicBoxVectors() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
| ComponentMapping, | ||
| LigandAtomMapping, | ||
| ProteinComponent, | ||
| ProteinMembraneComponent, | ||
| SmallMoleculeComponent, | ||
| SolventComponent, | ||
| settings, | ||
|
|
@@ -196,9 +197,20 @@ def _adaptive_settings( | |
| protocol_settings.lambda_settings.lambda_windows = 22 | ||
|
|
||
| # adapt the solvation padding based on the system components | ||
| if stateA.contains(ProteinComponent) and stateB.contains(ProteinComponent): | ||
| if stateA.contains(ProteinComponent): | ||
| protocol_settings.solvation_settings.solvent_padding = 1 * offunit.nanometer | ||
|
|
||
| # adapt the barostat based on the system components | ||
| if stateA.contains(ProteinMembraneComponent): | ||
| protocol_settings.integrator_settings.barostat = "MonteCarloMembraneBarostat" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an adpative settings entry for both ABFEs and SepTop?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added these! |
||
| protocol_settings.forcefield_settings.forcefields = [ | ||
| "amber/ff14SB.xml", | ||
| "amber/tip3p_standard.xml", | ||
| "amber/tip3p_HFE_multivalent.xml", | ||
| "amber/lipid17_merged.xml", | ||
| "amber/phosaa10.xml", | ||
| ] | ||
|
|
||
| return protocol_settings | ||
|
|
||
| @staticmethod | ||
|
|
@@ -539,6 +551,11 @@ def _validate( | |
| # Validate protein component | ||
| system_validation.validate_protein(stateA) | ||
|
|
||
| # Validate the barostat used in combination with the protein component | ||
| system_validation.validate_barostat( | ||
| stateA, self.settings.integrator_settings.barostat | ||
| ) | ||
|
|
||
| # Validate charge difference | ||
| # Note: validation depends on the mapping & solvent component checks | ||
| if stateA.contains(SolventComponent): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.