-
Notifications
You must be signed in to change notification settings - Fork 4
Write a standard polarisable OpenMM script (with polxml) + add directly the Tang-Toennis parameters inside (with coulttxml) #42
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?
Conversation
For notation consistency, an "omm-p-tt.py" file is written instead of an "omm-p-sc.py" one. It prevent confusions with the "field-p-sc.py" file name, in which the "-sc" refers to the scaling of LJ parameters.
For notation consistency, an "omm-p-tt.py" file is written instead of an "omm-p-sc.py" one. It prevent confusions with the "field-p-sc.py" file name, in which the "-sc" refers to the scaling of LJ parameters.
coulttxml
Outdated
| print("OpenMM code for CoulTT written to addCoulTT.py") | ||
| if args.s is not None: | ||
| with open("omm-p-tt.py", 'w') as outputfile: | ||
| with open(args.s, 'r') as file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the omm-p.py script into data can be before and outside the 'with open("omm-p-tt.py")' structure, to avoid excessive indent
|
|
||
| print("Tang-Toennis parameters written to omm-p-tt.py") | ||
|
|
||
| elif args.s is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of code is repeated. Can this be done in a more compact way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I condensed the code using a "write_coultt" function to avoid repetitions.
polxml
Outdated
|
|
||
| if data[line] == "### Run simulation ###\n": | ||
| del data[line:line+4] | ||
| outputfile.write("### Constants ###\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in fftool, most of this is immutable text, so more suitable in a """..."""
Also, the question if this is the best way. Maybe include an omm-p.py example with polxml?
Scale with sqrt(k) when one fragment of dimer is already polarized. Make polarisable case-insensitive
Update scaleLJxml Scale with sqrt(k) when one fragment of dimer is already polarized. Make polarisable case-insensitive
No description provided.