Skip to content
Merged
Changes from all commits
Commits
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
21 changes: 21 additions & 0 deletions src/somd2/runner/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def __init__(self, system, config):
# user's final choice of output directory is known.
self._config._setup_output_directory()

self._log_system_size()

# GCMC of solvent water is only well defined at constant volume.
if self._config.gcmc and self._config.pressure is not None:
_logger.info(
Expand Down Expand Up @@ -1155,6 +1157,22 @@ def _has_restraints(self, restraint_type):
for restraint in self._config.restraints or []
)

def _log_system_size(self):
"""
Log the number of atoms and virtual sites in the input system.
"""
try:
num_virtual_sites = sum(
mol.property("n_virtual_sites").as_integer()
for mol in self._system.molecules("property n_virtual_sites")
)
except KeyError:
num_virtual_sites = 0
_logger.info(
f"System contains {self._system.num_atoms()} atoms and "
f"{num_virtual_sites} virtual sites."
)

def _add_boresch_restraint(self, device=None):
"""
Generate a Boresch restraint for an ABFE bound leg with no user-supplied
Expand All @@ -1178,6 +1196,9 @@ def _add_boresch_restraint(self, device=None):
_logger.error(msg)
raise RuntimeError(msg)

for restraint in restraints:
_logger.info(f"Boresch restraint: {restraint}")

self._dynamics_kwargs["restraints"] = (
self._dynamics_kwargs["restraints"] or []
) + [restraints]
Expand Down