Skip to content
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

changed pydantic version and barostat condition to allow nvt #21

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
removed gmx subtop support, convert to amber or full gmx top
hengma1001 committed Dec 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8dfe5bfd83d3eeb154b704277c219bfb847c02f7
13 changes: 3 additions & 10 deletions deepdrivemd/apps/openmm_simulation/app.py
Original file line number Diff line number Diff line change
@@ -250,17 +250,8 @@ def copy_topology(self, directory: Path) -> Optional[Path]:
"""Scan directory for optional topology file (assumes topology
file is in the same directory as the PDB file and that only
one PDB/topology file exists in each directory.)"""
top_file = next(directory.glob("*.top"), None)
if top_file is None:
top_file = next(directory.glob("*.prmtop"), None)
top_file = next(directory.glob("*.prmtop"), None)
if top_file is not None:
# copying additional files, such as ff
other_files = list(directory.glob("*"))
pdb_file = next(directory.glob("*.pdb"), None)
other_files.remove(top_file)
other_files.remove(pdb_file)
for other_file in other_files:
self.copy_to_workdir(other_file)
top_file = self.copy_to_workdir(top_file)

return top_file
@@ -272,6 +263,7 @@ def generate_restart_pdb(self, sim_dir: Path, frame: int) -> Path:
dcd_file = next(sim_dir.glob("*.dcd"))
except:
dcd_file = next(sim_dir.glob("*.xtc"))

# New pdb file to write, example: workdir/run-<uuid>_frame000000.pdb
pdb_file = self.workdir / f"{old_pdb_file.parent.name}_frame{frame:06}.pdb"
mda_u = MDAnalysis.Universe(str(old_pdb_file), str(dcd_file))
@@ -330,6 +322,7 @@ def run(self, input_data: MDSimulationInput) -> MDSimulationOutput:
else:
traj_file = str(self.workdir / "sim.dcd")
sim.reporters.append(app.DCDReporter(traj_file, report_steps))

sim.reporters.append(
app.StateDataReporter(
str(self.workdir / "sim.log"),