Skip to content

Conversation

@mcancade
Copy link
Contributor

No description provided.

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:
Copy link
Member

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:
Copy link
Member

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?

Copy link
Contributor Author

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")
Copy link
Member

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?

mcancade and others added 8 commits March 6, 2025 11:23
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
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.

3 participants