diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index fbc85aea..be78bbd3 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -19,13 +19,9 @@ jobs: fail-fast: false matrix: cfg: - - { os: ubuntu-latest, python-version: 3.7, docs: true, openmm: latest } - - { os: macos-latest, python-version: 3.7, docs: true, openmm: latest } - - { os: ubuntu-latest, python-version: 3.8, docs: false, openmm: latest } - - { os: ubuntu-latest, python-version: 3.7, docs: false, openmm: nightly } - - { os: ubuntu-latest, python-version: 3.8, docs: false, openmm: nightly } - - { os: ubuntu-latest, python-version: 3.7, docs: false, openmm: conda-forge } - - { os: ubuntu-latest, python-version: 3.8, docs: false, openmm: conda-forge } + - { os: ubuntu-latest, python-version: "3.9", docs: false, openmm: conda-forge } + - { os: ubuntu-latest, python-version: "3.10", docs: false, openmm: conda-forge } + - { os: ubuntu-latest, python-version: "3.11", docs: false, openmm: conda-forge } env: OPENMM: ${{ matrix.cfg.openmm }} @@ -33,7 +29,7 @@ jobs: PACKAGENAME: yank steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Additional info about the build shell: bash @@ -51,26 +47,18 @@ jobs: auto-update-conda: true auto-activate-base: false show-channel-urls: true + mamba-version: "*" - name: Refine test environment shell: bash -l {0} run: | case ${{ matrix.cfg.openmm }} in - latest) + 7.7) echo "Using latest release OpenMM." - conda install --quiet -c omnia openmm;; - rc) - echo "Using OpenMM rc" - conda install --quiet -c omnia/label/rc openmm;; - beta) - echo "Using OpenMM beta" - conda install --quiet -c omnia/label/beta openmm;; - nightly) - echo "Using OpenMM nightly dev build." - conda install --quiet -c omnia-dev openmm;; + conda install --quiet -c conda-forge openmm=7.7;; conda-forge) echo "Using OpenMM conda-forge testing build." - conda install --quiet -c conda-forge/label/test openmm;; + conda install --quiet -c conda-forge openmm;; esac - name: Install package diff --git a/.gitignore b/.gitignore index 57e49b3e..513fb432 100644 --- a/.gitignore +++ b/.gitignore @@ -36,10 +36,9 @@ nosetests.xml .pydevproject yank/version.py -Yank/version.py # emacs *~ # Cython files generated by setup.py -Yank/mixing/_mix_replicas.c +yank/mixing/_mix_replicas.c diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index df4a45f9..640ba618 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -2,7 +2,6 @@ name: test channels: - conda-forge - defaults - - omnia - openeye - salilab dependencies: @@ -16,19 +15,19 @@ dependencies: - mdtraj >=1.7.2 - openmmtools >=0.18.3 - pymbar <4 - - ambermini >=16.16.0 - docopt - openmoltools >=0.7.5 - mpiplus - pyyaml - clusterutils - sphinxcontrib-bibtex - - cerberus ==1.1 # yank uses buggy cerberus 1.1 behavior as a feature ¯\_(ツ)_/¯ + - cerberus - matplotlib - jupyter - pdbfixer - openeye-toolkits - modeller + - parmed # test - nose - nose-timer diff --git a/docs/conf.py b/docs/conf.py index 41320237..8b545f5a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -222,7 +222,7 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'Yank.tex', u'Yank Documentation', + ('index', 'yank.tex', u'yank Documentation', u'John Chodera', 'manual'), ] @@ -252,7 +252,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'yank', u'Yank Documentation', + ('index', 'yank', u'yank Documentation', [u'John Chodera'], 1) ] @@ -266,8 +266,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'Yank', u'Yank Documentation', - u'John Chodera', 'Yank', 'A flexible GPU-accelerated Python framework for alchemical free energy calculations.', + ('index', 'yank', u'yank Documentation', + u'John Chodera', 'yank', 'A flexible GPU-accelerated Python framework for alchemical free energy calculations.', 'Miscellaneous'), ] diff --git a/docs/yank-yaml-cookbook/all-options.yaml b/docs/yank-yaml-cookbook/all-options.yaml index 0ad9389d..45238e93 100644 --- a/docs/yank-yaml-cookbook/all-options.yaml +++ b/docs/yank-yaml-cookbook/all-options.yaml @@ -1,14 +1,14 @@ # Here are listed all the options that is possible to specify in a -# Yank YAML script. There are no mandatory options. If not specified, +# yank YAML script. There are no mandatory options. If not specified, # an option assumes the default value listed below. --- options: # GENERAL OPTIONS # --------------- verbose: no # Turn on/off verbose output. - resume_setup: no # By default, Yank will raise an error when it detects + resume_setup: no # By default, yank will raise an error when it detects resume_simulation: no # that it will have to overwrite an existing file. Set - # resume_setup and/or resume_simulation if you want Yank + # resume_setup and/or resume_simulation if you want yank # to resume from an existing setup (molecules and system # files) and/or simulation (netcdf4 trajectory files) # respectively instead. diff --git a/docs/yank-yaml-cookbook/combinatorial-experiment.yaml b/docs/yank-yaml-cookbook/combinatorial-experiment.yaml index 97240428..8d1b1bf2 100644 --- a/docs/yank-yaml-cookbook/combinatorial-experiment.yaml +++ b/docs/yank-yaml-cookbook/combinatorial-experiment.yaml @@ -37,10 +37,10 @@ molecules: strip_protons: yes imatinib: - filepath: clinical-kinase-inhibitors.csv # Yank supports pdb, mol2, sdf and csv files. The last one + filepath: clinical-kinase-inhibitors.csv # yank supports pdb, mol2, sdf and csv files. The last one # must contain one row for each molecule. The second column # must be the SMILES description of the molecule (the first - # column if the csv file has only one). Yank can use the + # column if the csv file has only one). yank can use the # OpenEye toolkits to generate a molecule from its name or # its SMILES description. Instead of using "filepath", you # can directly use "smiles" or "name". For example, to @@ -154,7 +154,7 @@ systems: # If you don't need com solvent: !Combinatorial [RF, vacuum] # solvent: RF pack: yes # If the ligand is far away from the receptor or if there # are clashing atoms (defined as closer than 1.5 angstroms), - # Yank will randomly translate and rotate the ligand until + # yank will randomly translate and rotate the ligand until # this is solved. Set this to "no" if you don't wan't to # modify the initial position of the ligand as defined in # your input file. diff --git a/setup.py b/setup.py index d8d055a3..51a1e751 100644 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ def _minimal_ext_cmd(cmd): return GIT_REVISION -def write_version_py(filename='Yank/version.py'): +def write_version_py(filename='yank/version.py'): cnt = """ # This file is automatically generated by setup.py short_version = '{base_version:s}' @@ -126,12 +126,12 @@ def find_package_data(data_root, package_root): url='https://github.com/choderalab/yank', platforms=['Linux', 'Mac OS-X', 'Unix', 'Windows'], classifiers=CLASSIFIERS.splitlines(), - package_dir={'yank': 'Yank'}, + package_dir={'yank': 'yank'}, # Helper line which did not work reliably for the packages key # + ['yank.{}'.format(package) for package in find_packages('yank')], packages=['yank', "yank.tests", "yank.tests.data", "yank.commands", "yank.reports", "yank.schema"], - package_data={'yank': find_package_data('Yank/tests/data', 'yank') + ['reports/*.ipynb'], + package_data={'yank': find_package_data('yank/tests/data', 'yank') + ['reports/*.ipynb'], }, zip_safe=False, python_requires=">=3.6", diff --git a/Yank/__init__.py b/yank/__init__.py similarity index 100% rename from Yank/__init__.py rename to yank/__init__.py diff --git a/Yank/analyze.py b/yank/analyze.py similarity index 99% rename from Yank/analyze.py rename to yank/analyze.py index 4191b822..d85fef57 100644 --- a/Yank/analyze.py +++ b/yank/analyze.py @@ -525,7 +525,7 @@ def get_mixing_data(self): @_copyout def get_experiment_free_energy_data(self): """ - Get the free Yank Experiment free energy, broken down by phase and total experiment + Get the free yank Experiment free energy, broken down by phase and total experiment Output is of the form: @@ -746,7 +746,7 @@ def get_analyzer(file_base_path, **analyzer_kwargs): Returns ------- - analyzer : instance of implemented :class:`Yank*Analyzer` + analyzer : instance of implemented :class:`yank*Analyzer` Analyzer for the specific phase. """ # Eventually extend this to get more reporters, but for now simple placeholder diff --git a/Yank/cli.py b/yank/cli.py similarity index 100% rename from Yank/cli.py rename to yank/cli.py diff --git a/Yank/commands/__init__.py b/yank/commands/__init__.py similarity index 100% rename from Yank/commands/__init__.py rename to yank/commands/__init__.py diff --git a/Yank/commands/analyze.py b/yank/commands/analyze.py similarity index 100% rename from Yank/commands/analyze.py rename to yank/commands/analyze.py diff --git a/Yank/commands/cite.py b/yank/commands/cite.py similarity index 100% rename from Yank/commands/cite.py rename to yank/commands/cite.py diff --git a/Yank/commands/cleanup.py b/yank/commands/cleanup.py similarity index 100% rename from Yank/commands/cleanup.py rename to yank/commands/cleanup.py diff --git a/Yank/commands/help.py b/yank/commands/help.py similarity index 100% rename from Yank/commands/help.py rename to yank/commands/help.py diff --git a/Yank/commands/platforms.py b/yank/commands/platforms.py similarity index 100% rename from Yank/commands/platforms.py rename to yank/commands/platforms.py diff --git a/Yank/commands/script.py b/yank/commands/script.py similarity index 100% rename from Yank/commands/script.py rename to yank/commands/script.py diff --git a/Yank/commands/selftest.py b/yank/commands/selftest.py similarity index 99% rename from Yank/commands/selftest.py rename to yank/commands/selftest.py index 1828311a..efaf7a89 100644 --- a/Yank/commands/selftest.py +++ b/yank/commands/selftest.py @@ -67,8 +67,8 @@ def dispatch(args): print("YANK Selftest") print("-------------") - # Yank Version - print("Yank Version %s \n" % version.version) + # yank Version + print("yank Version %s \n" % version.version) # OpenMM Platforms if not (args['platforms'] > 0): # Don't need to check for --skip since invalid without argument diff --git a/Yank/commands/status.py b/yank/commands/status.py similarity index 100% rename from Yank/commands/status.py rename to yank/commands/status.py diff --git a/Yank/experiment.py b/yank/experiment.py similarity index 99% rename from Yank/experiment.py rename to yank/experiment.py index 2b266403..c9076f1d 100644 --- a/Yank/experiment.py +++ b/yank/experiment.py @@ -8,7 +8,7 @@ Experiment ========== -Tools to build Yank experiments from a YAML configuration file. +Tools to build yank experiments from a YAML configuration file. This is not something that should be normally invoked by the user, and instead created by going through the Command Line Interface with the ``yank script`` command. @@ -79,7 +79,7 @@ def _is_phase_completed(status, number_of_iterations): # ============================================================================== class YamlParseError(Exception): - """Represent errors occurring during parsing of Yank YAML file.""" + """Represent errors occurring during parsing of yank YAML file.""" def __init__(self, message): super(YamlParseError, self).__init__(message) logger.error(message) @@ -683,7 +683,7 @@ def parse(self, script): # Setup general logging utils.config_root_logger(self._options['verbose'], log_file_path=None) - # Configure ContextCache, platform and precision. A Yank simulation + # Configure ContextCache, platform and precision. A yank simulation # currently needs 3 contexts: 1 for the alchemical states and 2 for # the states with expanded cutoff. platform = self._configure_platform(self._options['platform'], @@ -715,7 +715,7 @@ def parse(self, script): def run_experiments(self, write_status=False): """ - Set up and run all the Yank experiments. + Set up and run all the yank experiments. Parameters ---------- @@ -784,7 +784,7 @@ def build_experiments(self): def setup_experiments(self): """ - Set up all systems required for the Yank experiments without running them. + Set up all systems required for the yank experiments without running them. """ # All paths must be relative to the script directory with moltools.utils.temporary_cd(self._script_dir): @@ -2076,7 +2076,7 @@ def _get_trailblaze_checkpoint_dir_path(self, experiment_path, phase_name): # -------------------------------------------------------------------------- def _check_resume_experiment(self, experiment_path, experiment): - """Check if Yank output files already exist. + """Check if yank output files already exist. Parameters ---------- @@ -3091,7 +3091,7 @@ def _build_experiment(self, experiment_path, experiment, use_dummy_protocol=Fals gromacs_include_dir = self._db.systems[system_id].get('gromacs_include_dir', None) charmm_parameter_files = self._db.systems[system_id].get('charmm_parameter_files', None) - # Prepare Yank arguments + # Prepare yank arguments phases = [None, None] # protocol is an OrderedDict so phases are in the correct # order (e.g. [complex, solvent] or [solvent1, solvent2]). diff --git a/Yank/pipeline.py b/yank/pipeline.py similarity index 99% rename from Yank/pipeline.py rename to yank/pipeline.py index 41bbe935..f4fcf08c 100644 --- a/Yank/pipeline.py +++ b/yank/pipeline.py @@ -8,7 +8,7 @@ Pipeline ======== -Utility functions to help setting up Yank configurations. +Utility functions to help setting up yank configurations. """ @@ -412,7 +412,7 @@ def create_system(parameters_file, box_vectors, create_system_args, system_optio def read_system_files(positions_file_path, parameters_file_path, system_options, gromacs_include_dir=None, charmm_parameter_files=None): - """Create a Yank arguments for a phase from system files. + """Create a yank arguments for a phase from system files. Parameters ---------- diff --git a/Yank/reports/YANK_Health_Report_Example.ipynb b/yank/reports/YANK_Health_Report_Example.ipynb similarity index 100% rename from Yank/reports/YANK_Health_Report_Example.ipynb rename to yank/reports/YANK_Health_Report_Example.ipynb diff --git a/Yank/reports/YANK_Health_Report_Template.ipynb b/yank/reports/YANK_Health_Report_Template.ipynb similarity index 100% rename from Yank/reports/YANK_Health_Report_Template.ipynb rename to yank/reports/YANK_Health_Report_Template.ipynb diff --git a/Yank/reports/__init__.py b/yank/reports/__init__.py similarity index 100% rename from Yank/reports/__init__.py rename to yank/reports/__init__.py diff --git a/Yank/reports/notebook.py b/yank/reports/notebook.py similarity index 100% rename from Yank/reports/notebook.py rename to yank/reports/notebook.py diff --git a/Yank/restraints.py b/yank/restraints.py similarity index 100% rename from Yank/restraints.py rename to yank/restraints.py diff --git a/Yank/schema/__init__.py b/yank/schema/__init__.py similarity index 100% rename from Yank/schema/__init__.py rename to yank/schema/__init__.py diff --git a/Yank/schema/validator.py b/yank/schema/validator.py similarity index 100% rename from Yank/schema/validator.py rename to yank/schema/validator.py diff --git a/Yank/tests/__init__.py b/yank/tests/__init__.py similarity index 100% rename from Yank/tests/__init__.py rename to yank/tests/__init__.py diff --git a/Yank/tests/data/README.md b/yank/tests/data/README.md similarity index 100% rename from Yank/tests/data/README.md rename to yank/tests/data/README.md diff --git a/Yank/tests/data/abl-imatinib-explicit/2HYY-pdbfixer.pdb b/yank/tests/data/abl-imatinib-explicit/2HYY-pdbfixer.pdb similarity index 100% rename from Yank/tests/data/abl-imatinib-explicit/2HYY-pdbfixer.pdb rename to yank/tests/data/abl-imatinib-explicit/2HYY-pdbfixer.pdb diff --git a/Yank/tests/data/abl-imatinib-explicit/STI02.mol2 b/yank/tests/data/abl-imatinib-explicit/STI02.mol2 similarity index 100% rename from Yank/tests/data/abl-imatinib-explicit/STI02.mol2 rename to yank/tests/data/abl-imatinib-explicit/STI02.mol2 diff --git a/Yank/tests/data/benzene-toluene-explicit/benzene.frcmod b/yank/tests/data/benzene-toluene-explicit/benzene.frcmod similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/benzene.frcmod rename to yank/tests/data/benzene-toluene-explicit/benzene.frcmod diff --git a/Yank/tests/data/benzene-toluene-explicit/benzene.gaff.mol2 b/yank/tests/data/benzene-toluene-explicit/benzene.gaff.mol2 similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/benzene.gaff.mol2 rename to yank/tests/data/benzene-toluene-explicit/benzene.gaff.mol2 diff --git a/Yank/tests/data/benzene-toluene-explicit/benzene.tripos.mol2 b/yank/tests/data/benzene-toluene-explicit/benzene.tripos.mol2 similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/benzene.tripos.mol2 rename to yank/tests/data/benzene-toluene-explicit/benzene.tripos.mol2 diff --git a/Yank/tests/data/benzene-toluene-explicit/complex.inpcrd b/yank/tests/data/benzene-toluene-explicit/complex.inpcrd similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/complex.inpcrd rename to yank/tests/data/benzene-toluene-explicit/complex.inpcrd diff --git a/Yank/tests/data/benzene-toluene-explicit/complex.prmtop b/yank/tests/data/benzene-toluene-explicit/complex.prmtop similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/complex.prmtop rename to yank/tests/data/benzene-toluene-explicit/complex.prmtop diff --git a/Yank/tests/data/benzene-toluene-explicit/solvent.inpcrd b/yank/tests/data/benzene-toluene-explicit/solvent.inpcrd similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/solvent.inpcrd rename to yank/tests/data/benzene-toluene-explicit/solvent.inpcrd diff --git a/Yank/tests/data/benzene-toluene-explicit/solvent.prmtop b/yank/tests/data/benzene-toluene-explicit/solvent.prmtop similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/solvent.prmtop rename to yank/tests/data/benzene-toluene-explicit/solvent.prmtop diff --git a/Yank/tests/data/benzene-toluene-explicit/toluene.frcmod b/yank/tests/data/benzene-toluene-explicit/toluene.frcmod similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/toluene.frcmod rename to yank/tests/data/benzene-toluene-explicit/toluene.frcmod diff --git a/Yank/tests/data/benzene-toluene-explicit/toluene.tripos.mol2 b/yank/tests/data/benzene-toluene-explicit/toluene.tripos.mol2 similarity index 100% rename from Yank/tests/data/benzene-toluene-explicit/toluene.tripos.mol2 rename to yank/tests/data/benzene-toluene-explicit/toluene.tripos.mol2 diff --git a/Yank/tests/data/benzene-toluene-standard-state/README.md b/yank/tests/data/benzene-toluene-standard-state/README.md similarity index 100% rename from Yank/tests/data/benzene-toluene-standard-state/README.md rename to yank/tests/data/benzene-toluene-standard-state/README.md diff --git a/Yank/tests/data/benzene-toluene-standard-state/standard_state_complex.inpcrd b/yank/tests/data/benzene-toluene-standard-state/standard_state_complex.inpcrd similarity index 100% rename from Yank/tests/data/benzene-toluene-standard-state/standard_state_complex.inpcrd rename to yank/tests/data/benzene-toluene-standard-state/standard_state_complex.inpcrd diff --git a/Yank/tests/data/benzene-toluene-standard-state/standard_state_complex.prmtop b/yank/tests/data/benzene-toluene-standard-state/standard_state_complex.prmtop similarity index 100% rename from Yank/tests/data/benzene-toluene-standard-state/standard_state_complex.prmtop rename to yank/tests/data/benzene-toluene-standard-state/standard_state_complex.prmtop diff --git a/Yank/tests/data/benzene-toluene-standard-state/standard_state_complex_boxless.inpcrd b/yank/tests/data/benzene-toluene-standard-state/standard_state_complex_boxless.inpcrd similarity index 100% rename from Yank/tests/data/benzene-toluene-standard-state/standard_state_complex_boxless.inpcrd rename to yank/tests/data/benzene-toluene-standard-state/standard_state_complex_boxless.inpcrd diff --git a/Yank/tests/data/benzene-toluene-standard-state/standard_state_complex_nan.inpcrd b/yank/tests/data/benzene-toluene-standard-state/standard_state_complex_nan.inpcrd similarity index 100% rename from Yank/tests/data/benzene-toluene-standard-state/standard_state_complex_nan.inpcrd rename to yank/tests/data/benzene-toluene-standard-state/standard_state_complex_nan.inpcrd diff --git a/Yank/tests/data/p-xylene-gromacs-example/complex.gro b/yank/tests/data/p-xylene-gromacs-example/complex.gro similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/complex.gro rename to yank/tests/data/p-xylene-gromacs-example/complex.gro diff --git a/Yank/tests/data/p-xylene-gromacs-example/complex.top b/yank/tests/data/p-xylene-gromacs-example/complex.top similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/complex.top rename to yank/tests/data/p-xylene-gromacs-example/complex.top diff --git a/Yank/tests/data/p-xylene-gromacs-example/solvent.gro b/yank/tests/data/p-xylene-gromacs-example/solvent.gro similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/solvent.gro rename to yank/tests/data/p-xylene-gromacs-example/solvent.gro diff --git a/Yank/tests/data/p-xylene-gromacs-example/solvent.top b/yank/tests/data/p-xylene-gromacs-example/solvent.top similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/solvent.top rename to yank/tests/data/p-xylene-gromacs-example/solvent.top diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/atomtypes.atp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/atomtypes.atp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/atomtypes.atp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/atomtypes.atp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/cmap.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/cmap.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/cmap.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/cmap.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffbonded.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffbonded.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffbonded.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffbonded.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffnonbonded.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffnonbonded.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffnonbonded.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ffnonbonded.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.doc b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.doc similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.doc rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.doc diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/forcefield.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/gb.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/gb.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/gb.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/gb.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ions.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ions.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ions.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/ions.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.arn b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.arn similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.arn rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.arn diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.c.tdb b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.c.tdb similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.c.tdb rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.c.tdb diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.hdb b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.hdb similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.hdb rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.hdb diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.n.tdb b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.n.tdb similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.n.tdb rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.n.tdb diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.r2b b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.r2b similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.r2b rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.r2b diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.rtp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.rtp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.rtp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.rtp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.vsd b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.vsd similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.vsd rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/merged.vsd diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/nbfix.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/nbfix.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/nbfix.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/nbfix.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spc.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spc.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spc.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spc.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spce.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spce.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spce.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/spce.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip3p.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip3p.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip3p.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip3p.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip4p.itp b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip4p.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip4p.itp rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/tip4p.itp diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/watermodels.dat b/yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/watermodels.dat similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/watermodels.dat rename to yank/tests/data/p-xylene-gromacs-example/top/charmm36.ff/watermodels.dat diff --git a/Yank/tests/data/p-xylene-gromacs-example/top/p-xyle.itp b/yank/tests/data/p-xylene-gromacs-example/top/p-xyle.itp similarity index 100% rename from Yank/tests/data/p-xylene-gromacs-example/top/p-xyle.itp rename to yank/tests/data/p-xylene-gromacs-example/top/p-xyle.itp diff --git a/Yank/tests/data/p-xylene-implicit/181L-pdbfixer.pdb b/yank/tests/data/p-xylene-implicit/181L-pdbfixer.pdb similarity index 100% rename from Yank/tests/data/p-xylene-implicit/181L-pdbfixer.pdb rename to yank/tests/data/p-xylene-implicit/181L-pdbfixer.pdb diff --git a/Yank/tests/data/p-xylene-implicit/p-xylene.mol2 b/yank/tests/data/p-xylene-implicit/p-xylene.mol2 similarity index 100% rename from Yank/tests/data/p-xylene-implicit/p-xylene.mol2 rename to yank/tests/data/p-xylene-implicit/p-xylene.mol2 diff --git a/Yank/tests/data/toluene-explicit/solvent.pdb b/yank/tests/data/toluene-explicit/solvent.pdb similarity index 100% rename from Yank/tests/data/toluene-explicit/solvent.pdb rename to yank/tests/data/toluene-explicit/solvent.pdb diff --git a/Yank/tests/data/toluene-explicit/solvent.xml b/yank/tests/data/toluene-explicit/solvent.xml similarity index 100% rename from Yank/tests/data/toluene-explicit/solvent.xml rename to yank/tests/data/toluene-explicit/solvent.xml diff --git a/Yank/tests/data/toluene-explicit/vacuum.pdb b/yank/tests/data/toluene-explicit/vacuum.pdb similarity index 100% rename from Yank/tests/data/toluene-explicit/vacuum.pdb rename to yank/tests/data/toluene-explicit/vacuum.pdb diff --git a/Yank/tests/data/toluene-explicit/vacuum.xml b/yank/tests/data/toluene-explicit/vacuum.xml similarity index 100% rename from Yank/tests/data/toluene-explicit/vacuum.xml rename to yank/tests/data/toluene-explicit/vacuum.xml diff --git a/Yank/tests/test_analyze.py b/yank/tests/test_analyze.py similarity index 100% rename from Yank/tests/test_analyze.py rename to yank/tests/test_analyze.py diff --git a/Yank/tests/test_cli.py b/yank/tests/test_cli.py similarity index 100% rename from Yank/tests/test_cli.py rename to yank/tests/test_cli.py diff --git a/Yank/tests/test_examples.py b/yank/tests/test_examples.py similarity index 100% rename from Yank/tests/test_examples.py rename to yank/tests/test_examples.py diff --git a/Yank/tests/test_experiment.py b/yank/tests/test_experiment.py similarity index 99% rename from Yank/tests/test_experiment.py rename to yank/tests/test_experiment.py index 840737ae..b2cd4941 100644 --- a/Yank/tests/test_experiment.py +++ b/yank/tests/test_experiment.py @@ -54,7 +54,7 @@ def indent(input_string): def examples_paths(): - """Return the absolute path to the Yank examples relevant to tests.""" + """Return the absolute path to the yank examples relevant to tests.""" data_dir = utils.get_data_filename(os.path.join('tests', 'data')) p_xylene_dir = os.path.join(data_dir, 'p-xylene-implicit') p_xylene_gro_dir = os.path.join(data_dir, 'p-xylene-gromacs-example') diff --git a/Yank/tests/test_pipeline.py b/yank/tests/test_pipeline.py similarity index 96% rename from Yank/tests/test_pipeline.py rename to yank/tests/test_pipeline.py index 780b93ed..e5e779bd 100644 --- a/Yank/tests/test_pipeline.py +++ b/yank/tests/test_pipeline.py @@ -25,9 +25,9 @@ def test_compute_min_dist(): """Test computation of minimum distance between two molecules""" - mol1_pos = np.array([[-1, -1, -1], [1, 1, 1]], np.float) - mol2_pos = np.array([[3, 3, 3], [3, 4, 5]], np.float) - mol3_pos = np.array([[2, 2, 2], [2, 4, 5]], np.float) + mol1_pos = np.array([[-1, -1, -1], [1, 1, 1]], float) + mol2_pos = np.array([[3, 3, 3], [3, 4, 5]], float) + mol3_pos = np.array([[2, 2, 2], [2, 4, 5]], float) assert compute_min_dist(mol1_pos, mol2_pos, mol3_pos) == np.sqrt(3) @@ -47,9 +47,9 @@ def test_compute_min_max_dist(): def test_remove_overlap(): """Test function remove_overlap().""" - mol1_pos = np.array([[-1, -1, -1], [1, 1, 1]], np.float) - mol2_pos = np.array([[1, 1, 1], [3, 4, 5]], np.float) - mol3_pos = np.array([[2, 2, 2], [2, 4, 5]], np.float) + mol1_pos = np.array([[-1, -1, -1], [1, 1, 1]], float) + mol2_pos = np.array([[1, 1, 1], [3, 4, 5]], float) + mol3_pos = np.array([[2, 2, 2], [2, 4, 5]], float) assert compute_min_dist(mol1_pos, mol2_pos, mol3_pos) < 0.1 mol1_pos = remove_overlap(mol1_pos, mol2_pos, mol3_pos, min_distance=0.1, sigma=2.0) assert compute_min_dist(mol1_pos, mol2_pos, mol3_pos) >= 0.1 @@ -57,9 +57,9 @@ def test_remove_overlap(): def test_pull_close(): """Test function pull_close().""" - mol1_pos = np.array([[-1, -1, -1], [1, 1, 1]], np.float) - mol2_pos = np.array([[-1, -1, -1], [1, 1, 1]], np.float) - mol3_pos = np.array([[10, 10, 10], [13, 14, 15]], np.float) + mol1_pos = np.array([[-1, -1, -1], [1, 1, 1]], float) + mol2_pos = np.array([[-1, -1, -1], [1, 1, 1]], float) + mol3_pos = np.array([[10, 10, 10], [13, 14, 15]], float) translation2 = pull_close(mol1_pos, mol2_pos, 1.5, 5) translation3 = pull_close(mol1_pos, mol3_pos, 1.5, 5) assert isinstance(translation2, np.ndarray) @@ -72,7 +72,7 @@ def test_pack_transformation(): BOX_SIZE = 5 CLASH_DIST = 1 - mol1 = np.array([[-1, -1, -1], [1, 1, 1]], np.float) + mol1 = np.array([[-1, -1, -1], [1, 1, 1]], float) mols = [np.copy(mol1), # distance = 0 mol1 + 2 * BOX_SIZE] # distance > box mols_affine = [np.append(mol, np.ones((2, 1)), axis=1) for mol in mols] diff --git a/Yank/tests/test_restraints.py b/yank/tests/test_restraints.py similarity index 100% rename from Yank/tests/test_restraints.py rename to yank/tests/test_restraints.py diff --git a/Yank/tests/test_schema.py b/yank/tests/test_schema.py similarity index 100% rename from Yank/tests/test_schema.py rename to yank/tests/test_schema.py diff --git a/Yank/tests/test_utils.py b/yank/tests/test_utils.py similarity index 100% rename from Yank/tests/test_utils.py rename to yank/tests/test_utils.py diff --git a/Yank/tests/test_yank.py b/yank/tests/test_yank.py similarity index 99% rename from Yank/tests/test_yank.py rename to yank/tests/test_yank.py index 7ae42e85..e4e884c3 100644 --- a/Yank/tests/test_yank.py +++ b/yank/tests/test_yank.py @@ -5,7 +5,7 @@ DESCRIPTION -This test suite generates a number of simple models to test the 'Yank' facility. +This test suite generates a number of simple models to test the 'yank' facility. COPYRIGHT @@ -644,7 +644,7 @@ def notest_LennardJonesPair(**kwargs): # alchemical_states) # # # Create new simulation. -# yank = Yank(store_dir, **options) +# yank = yank(store_dir, **options) # yank.create(thermodynamic_state, alchemical_phase) # # # Run the simulation. diff --git a/Yank/utils.py b/yank/utils.py similarity index 99% rename from Yank/utils.py rename to yank/utils.py index a431d2c8..bba7c6f7 100644 --- a/Yank/utils.py +++ b/yank/utils.py @@ -31,7 +31,12 @@ import itertools import contextlib import subprocess -import collections + +try: + from collections import MutableMapping, Mapping +except ImportError: + # Support python 3.10 + from collections.abc import MutableMapping, Mapping from pkg_resources import resource_filename @@ -276,7 +281,7 @@ def __repr__(self): return "Combinatorial({})".format(super(CombinatorialLeaf, self).__repr__()) -class CombinatorialTree(collections.MutableMapping): +class CombinatorialTree(MutableMapping): """A tree that can be expanded in a combinatorial fashion. Each tree node with its subnodes is represented as a nested dictionary. Nodes can be @@ -618,7 +623,7 @@ def recursive_find_leaves(node): leaf_paths = [] leaf_vals = [] for child_key, child_val in node.items(): - if isinstance(child_val, collections.Mapping): + if isinstance(child_val, Mapping): subleaf_paths, subleaf_vals = recursive_find_leaves(child_val) # prepend child key to path leaf_paths.extend([(child_key,) + subleaf for subleaf in subleaf_paths]) @@ -760,7 +765,7 @@ def update_nested_dict(original, updated): """ new = original.copy() for key, value in updated.items(): - if isinstance(value, collections.Mapping): + if isinstance(value, Mapping): replacement = update_nested_dict(new.get(key, {}), value) new[key] = replacement else: @@ -1791,7 +1796,7 @@ def generate_development_feature(feature_dict): require instantiation. Function names are all given the `dev_` prefix to avoid clashes with other names its a part of its psudo-mixin properties """ - base_err = ('This feature cannot be used because it has been marked as "Developmental" and ' + base_err = ('This feature cannot be used because it has been marked as "Developmental" and ' 'the following conditions have not been met:\n') valid = True # Assume valid until proven otherwise check_dict = {} diff --git a/Yank/yank.py b/yank/yank.py similarity index 99% rename from Yank/yank.py rename to yank/yank.py index b117365a..3eab9bab 100644 --- a/Yank/yank.py +++ b/yank/yank.py @@ -5,7 +5,7 @@ # ============================================================================== """ -Yank +yank ==== Interface for automated free energy calculations.