├── .github └── workflows │ ├── paramol_ci.yml │ └── paramol_env.yml ├── .gitignore ├── .readthedocs.yml ├── .travis.yml ├── Examples ├── Example_1 │ ├── co.inpcrd │ ├── co.prmtop │ └── example_1.py ├── Example_2 │ ├── aniline.inpcrd │ ├── aniline.prmtop │ ├── esp.log │ └── example_2.py ├── Example_3 │ ├── caffeine.inpcrd │ ├── caffeine.prmtop │ ├── example_3.py │ └── example_3_quality.py ├── Example_4 │ ├── aspirin.inpcrd │ ├── aspirin.prmtop │ ├── aspirin_reference_data.nc │ ├── example_4_parallel.py │ └── example_4_serial.py ├── Example_5 │ ├── example_5.py │ ├── example_5_alternative.py │ ├── example_5_write_ff.py │ ├── norfloxacin.inpcrd │ └── norfloxacin.prmtop ├── Example_7 │ ├── ethane.inpcrd │ ├── ethane.prmtop │ ├── example_7.py │ ├── example_7_write_ff.py │ ├── propane.inpcrd │ └── propane.prmtop ├── Example_8 │ ├── aniline.inpcrd │ ├── aniline.prmtop │ ├── example_8_parallel.py │ └── example_8_serial.py └── Example_9 │ ├── aniline.inpcrd │ ├── aniline.prmtop │ └── example_9_serial_param.py ├── LICENSE ├── ParaMol ├── Force_field │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── force_field.cpython-36.pyc │ │ ├── force_field.cpython-37.pyc │ │ ├── force_field_term.cpython-36.pyc │ │ ├── force_field_term.cpython-37.pyc │ │ ├── force_field_term_parameter.cpython-36.pyc │ │ └── force_field_term_parameter.cpython-37.pyc │ ├── force_field.py │ ├── force_field_term.py │ └── force_field_term_parameter.py ├── HMC │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ ├── hmc_sampler.cpython-37.pyc │ │ └── integrators_adapted.cpython-37.pyc │ ├── hmc_sampler.py │ ├── hmc_sampler_qm_mm.py │ └── integrators_adapted.py ├── MM_engines │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── openmm.cpython-36.pyc │ │ ├── openmm.cpython-37.pyc │ │ ├── resp.cpython-36.pyc │ │ └── resp.cpython-37.pyc │ ├── least_square.py │ ├── openmm.py │ └── resp.py ├── Objective_function │ ├── Properties │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-36.pyc │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── energy_property.cpython-36.pyc │ │ │ ├── energy_property.cpython-37.pyc │ │ │ ├── esp_property.cpython-36.pyc │ │ │ ├── esp_property.cpython-37.pyc │ │ │ ├── force_property.cpython-36.pyc │ │ │ ├── force_property.cpython-37.pyc │ │ │ ├── property.cpython-36.pyc │ │ │ ├── property.cpython-37.pyc │ │ │ ├── regularization.cpython-36.pyc │ │ │ └── regularization.cpython-37.pyc │ │ ├── energy_property.py │ │ ├── esp_property.py │ │ ├── force_property.py │ │ ├── property.py │ │ └── regularization.py │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── cpu_objective_function.cpython-36.pyc │ │ ├── cpu_objective_function.cpython-37.pyc │ │ ├── gpu_objective_function.cpython-36.pyc │ │ ├── gpu_objective_function.cpython-37.pyc │ │ ├── objective_function.cpython-36.pyc │ │ ├── objective_function.cpython-37.pyc │ │ ├── pickable_swig.cpython-36.pyc │ │ └── pickable_swig.cpython-37.pyc │ ├── cpu_objective_function.py │ ├── gpu_objective_function.py │ ├── objective_function.py │ └── pickable_swig.py ├── Optimizers │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── gradient_descent.cpython-36.pyc │ │ ├── gradient_descent.cpython-37.pyc │ │ ├── monte_carlo.cpython-36.pyc │ │ ├── monte_carlo.cpython-37.pyc │ │ ├── optimizer.cpython-36.pyc │ │ ├── optimizer.cpython-37.pyc │ │ ├── scipy_optimizers.cpython-36.pyc │ │ ├── scipy_optimizers.cpython-37.pyc │ │ ├── simulated_annealing.cpython-36.pyc │ │ └── simulated_annealing.cpython-37.pyc │ ├── devel │ │ ├── __init__.py │ │ └── bayesian.py │ ├── gradient_descent.py │ ├── monte_carlo.py │ ├── optimizer.py │ ├── scipy_optimizers.py │ └── simulated_annealing.py ├── Parameter_space │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── parameter_space.cpython-36.pyc │ │ └── parameter_space.cpython-37.pyc │ └── parameter_space.py ├── QM_engines │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── amber_wrapper.cpython-36.pyc │ │ ├── amber_wrapper.cpython-37.pyc │ │ ├── ase_wrapper.cpython-36.pyc │ │ ├── ase_wrapper.cpython-37.pyc │ │ ├── dftb_wrapper.cpython-36.pyc │ │ ├── dftb_wrapper.cpython-37.pyc │ │ ├── qm_engine.cpython-36.pyc │ │ └── qm_engine.cpython-37.pyc │ ├── amber_wrapper.py │ ├── ase_wrapper.py │ ├── dftb_wrapper.py │ └── qm_engine.py ├── System │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-35.pyc │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── system.cpython-35.pyc │ │ ├── system.cpython-36.pyc │ │ └── system.cpython-37.pyc │ └── system.py ├── Tasks │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── ab_initio_properties.cpython-36.pyc │ │ ├── ab_initio_properties.cpython-37.pyc │ │ ├── adaptive_parametrization.cpython-36.pyc │ │ ├── adaptive_parametrization.cpython-37.pyc │ │ ├── objective_function_plot.cpython-36.pyc │ │ ├── objective_function_plot.cpython-37.pyc │ │ ├── parametrization.cpython-36.pyc │ │ ├── parametrization.cpython-37.pyc │ │ ├── resp_fitting.cpython-36.pyc │ │ ├── resp_fitting.cpython-37.pyc │ │ ├── task.cpython-36.pyc │ │ ├── task.cpython-37.pyc │ │ ├── torsions_parametrization.cpython-36.pyc │ │ ├── torsions_parametrization.cpython-37.pyc │ │ ├── torsions_scan.cpython-36.pyc │ │ └── torsions_scan.cpython-37.pyc │ ├── ab_initio_properties.py │ ├── adaptive_parametrization.py │ ├── forces_parallel │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── __init__.cpython-36.pyc │ │ │ └── __init__.cpython-37.pyc │ ├── lls_fitting.py │ ├── objective_function_plot.py │ ├── parametrization.py │ ├── resp_fitting.py │ ├── task.py │ ├── torsions_parametrization.py │ └── torsions_scan.py ├── Tests │ ├── External │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── test_rdkit.cpython-37-pytest-5.3.5.pyc │ │ │ └── test_rdkit.cpython-37-pytest-6.0.1.pyc │ │ └── test_rdkit.py │ ├── Force_field │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── test_force_field.cpython-37-pytest-5.3.5.pyc │ │ │ └── test_force_field.cpython-37-pytest-6.0.1.pyc │ │ └── test_force_field.py │ ├── MM_engines │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── test_openmm_wrapper.cpython-37-pytest-5.3.5.pyc │ │ │ └── test_openmm_wrapper.cpython-37-pytest-6.0.1.pyc │ │ └── test_openmm_wrapper.py │ ├── Objective_function │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── test_objective_function.cpython-37-pytest-5.3.5.pyc │ │ │ └── test_objective_function.cpython-37-pytest-6.0.1.pyc │ │ └── test_objective_function.py │ ├── Parameter_space │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── test_parameter_space.cpython-37-pytest-5.3.5.pyc │ │ │ └── test_parameter_space.cpython-37-pytest-6.0.1.pyc │ │ └── test_parameter_space.py │ ├── System │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── test_system.cpython-37-pytest-5.3.5.pyc │ │ │ └── test_system.cpython-37-pytest-6.0.1.pyc │ │ └── test_system.py │ ├── Tasks │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ ├── test_resp.cpython-37-pytest-5.3.5.pyc │ │ │ └── test_resp.cpython-37-pytest-6.0.1.pyc │ │ ├── aniline_opt.log │ │ └── test_resp.py │ ├── __init__.py │ ├── __pycache__ │ │ └── __init__.cpython-37.pyc │ ├── aniline.inpcrd │ ├── aniline.prmtop │ ├── aniline.xml │ └── aniline_10_struct.nc ├── Utils │ ├── Symmetrizers │ │ ├── __init__.py │ │ ├── amber_symmetrizer.py │ │ ├── charmm_symmetrizer.py │ │ ├── gromacs_symmetrizer.py │ │ └── symmetrizer.py │ ├── __init__.py │ ├── __init__.pyc │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── amber_symmetrizer.cpython-36.pyc │ │ ├── amber_symmetrizer.cpython-37.pyc │ │ ├── conformational_sampling.cpython-36.pyc │ │ ├── conformational_sampling.cpython-37.pyc │ │ ├── gaussian_esp.cpython-36.pyc │ │ ├── gaussian_esp.cpython-37.pyc │ │ ├── interface.cpython-36.pyc │ │ ├── interface.cpython-37.pyc │ │ ├── settings.cpython-36.pyc │ │ └── settings.cpython-37.pyc │ ├── conformational_sampling.py │ ├── gaussian_esp.py │ ├── geometry.py │ ├── interface.py │ ├── settings.py │ └── settings.pyc ├── __init__.py ├── __init__.pyc └── __pycache__ │ ├── __init__.cpython-35.pyc │ ├── __init__.cpython-36.pyc │ └── __init__.cpython-37.pyc ├── README.md ├── conda-build ├── bld.bat └── meta.yaml ├── docs ├── Makefile ├── environment.yml ├── make.bat └── source │ ├── About.rst │ ├── Change_log.rst │ ├── Examples.rst │ ├── Examples │ ├── Example_1 │ │ └── Example_1.rst │ ├── Example_2 │ │ ├── Example_2.rst │ │ ├── aniline_resp_explicit.ff │ │ ├── aniline_resp_scipy.ff │ │ └── gaussian_calculations │ │ │ ├── aniline.com │ │ │ ├── aniline.log │ │ │ ├── aniline_opt.com │ │ │ ├── aniline_opt.log │ │ │ └── esp_charges_gaussian.dat │ ├── Example_3 │ │ ├── Example_3.rst │ │ ├── caffeine.png │ │ ├── caffeine_energies_dftb_no_wham.png │ │ └── caffeine_forces_dftb_no_wham.png │ ├── Example_4 │ │ ├── Example_4.rst │ │ └── aspirin.png │ ├── Example_5 │ │ ├── Example_5.rst │ │ ├── norfloxacin.png │ │ ├── norfloxacin_symm_mod.ff │ │ └── norfloxacin_symm_original.ff │ ├── Example_6 │ │ └── Example_6.rst │ ├── Example_7 │ │ ├── Example_7.rst │ │ ├── ethane_symm_mod.ff │ │ ├── ethane_symm_opt.ff │ │ ├── ethane_symm_original.ff │ │ ├── propane_symm_mod.ff │ │ ├── propane_symm_opt.ff │ │ └── propane_symm_original.ff │ ├── Example_8 │ │ ├── Example_8.rst │ │ └── nmc_mc_diagram.png │ └── Example_9 │ │ └── Example_9.rst │ ├── Files_specification.rst │ ├── Installation.rst │ ├── ParaMol.rst │ ├── ParaMol_Package │ ├── ParaMol.Force_field.force_field.rst │ ├── ParaMol.Force_field.force_field_term.rst │ ├── ParaMol.Force_field.force_field_term_parameter.rst │ ├── ParaMol.Force_field.rst │ ├── ParaMol.HMC.hmc_sampler.rst │ ├── ParaMol.HMC.hmc_sampler_qm_mm.rst │ ├── ParaMol.HMC.rst │ ├── ParaMol.MM_engines.openmm.rst │ ├── ParaMol.MM_engines.resp.rst │ ├── ParaMol.MM_engines.rst │ ├── ParaMol.Objective_function.Properties.energy_property.rst │ ├── ParaMol.Objective_function.Properties.esp_property.rst │ ├── ParaMol.Objective_function.Properties.force_property.rst │ ├── ParaMol.Objective_function.Properties.property.rst │ ├── ParaMol.Objective_function.Properties.regularization.rst │ ├── ParaMol.Objective_function.Properties.rst │ ├── ParaMol.Objective_function.cpu_objective_function.rst │ ├── ParaMol.Objective_function.gpu_objective_function.rst │ ├── ParaMol.Objective_function.objective_function.rst │ ├── ParaMol.Objective_function.rst │ ├── ParaMol.Optimizers.gradient_descent.rst │ ├── ParaMol.Optimizers.monte_carlo.rst │ ├── ParaMol.Optimizers.optimizer.rst │ ├── ParaMol.Optimizers.rst │ ├── ParaMol.Optimizers.scipy_optimizers.rst │ ├── ParaMol.Optimizers.simulated_annealing.rst │ ├── ParaMol.Parameter_space.parameter_space.rst │ ├── ParaMol.Parameter_space.rst │ ├── ParaMol.QM_engines.amber_wrapper.rst │ ├── ParaMol.QM_engines.ase_wrapper.rst │ ├── ParaMol.QM_engines.dftb_wrapper.rst │ ├── ParaMol.QM_engines.qm_engine.rst │ ├── ParaMol.QM_engines.rst │ ├── ParaMol.System.rst │ ├── ParaMol.System.system.rst │ ├── ParaMol.Tasks.ab_initio_properties.rst │ ├── ParaMol.Tasks.adaptive_parametrization.rst │ ├── ParaMol.Tasks.forces_parallel.rst │ ├── ParaMol.Tasks.objective_function_plot.rst │ ├── ParaMol.Tasks.parametrization.rst │ ├── ParaMol.Tasks.resp_fitting.rst │ ├── ParaMol.Tasks.rst │ ├── ParaMol.Tasks.task.rst │ ├── ParaMol.Tasks.torsions_parametrization.rst │ ├── ParaMol.Tasks.torsions_scan.rst │ ├── ParaMol.Utils.Symmetrizers.amber_symmetrizer.rst │ ├── ParaMol.Utils.Symmetrizers.charmm_symmetrizer.rst │ ├── ParaMol.Utils.Symmetrizers.gromacs_symmetrizer.rst │ ├── ParaMol.Utils.Symmetrizers.rst │ ├── ParaMol.Utils.Symmetrizers.symmetrizer.rst │ ├── ParaMol.Utils.conformational_sampling.rst │ ├── ParaMol.Utils.gaussian_esp.rst │ ├── ParaMol.Utils.interface.rst │ ├── ParaMol.Utils.rst │ └── ParaMol.Utils.settings.rst │ ├── ParaMol_settings.rst │ ├── conf.py │ ├── index.rst │ ├── paramol-white.png │ ├── paramol.png │ └── paramol_old.jpg └── setup.py /.github/workflows/paramol_ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | strategy: 13 | fail-fast: false 14 | matrix: 15 | python-version: ["3.10"] 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Set up Python ${{ matrix.python-version }} 20 | uses: actions/setup-python@v3 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | - uses: conda-incubator/setup-miniconda@v2 24 | with: 25 | miniconda-version: "latest" 26 | channels: anaconda, ambermd, jmorado, omnia, rdkit, conda-forge, defaults 27 | use-only-tar-bz2: true 28 | auto-update-conda: true 29 | auto-activate-base: false 30 | python-version: ${{ matrix.python-version }} 31 | environment-file: .github/workflows/paramol_env.yml 32 | - shell: bash -l {0} 33 | run: | 34 | conda info 35 | conda list 36 | - name: Lint 37 | shell: bash -l {0} 38 | run: | 39 | conda install flake8 40 | python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 41 | python -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 42 | - name: Run pytest 43 | shell: bash -l {0} 44 | run: | 45 | conda install pytest 46 | python -m pytest 47 | 48 | 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docs/_build 2 | conda-build/ParaMol.egg-info/ 3 | .idea 4 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | configuration: docs/source/conf.py 11 | 12 | # Conda 13 | conda: 14 | environment: docs/environment.yml 15 | 16 | # Optionally set the version of Python and requirements required to build your docs 17 | python: 18 | version: 3.7 19 | install: 20 | - requirements: docs/requirements.txt 21 | 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | python: 4 | - "3.7" 5 | 6 | install: 7 | # Download Miniconda3 8 | - wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh 9 | - bash miniconda.sh -b -p $HOME/miniconda 10 | - source "$HOME/miniconda/etc/profile.d/conda.sh" 11 | # Create conda environment and update it 12 | - conda update --yes -q conda 13 | - conda config --set always_yes yes 14 | - conda create -q -n paramol python=$TRAVIS_PYTHON_VERSION 15 | - conda activate paramol 16 | - conda env update --file docs/environment.yml 17 | - python setup.py install 18 | 19 | # Run tests 20 | script: 21 | - python setup.py test 22 | -------------------------------------------------------------------------------- /Examples/Example_1/co.inpcrd: -------------------------------------------------------------------------------- 1 | MOL 2 | 2 3 | 33.9080000 33.9080000 33.9080000 33.9080000 33.9080000 35.0790000 4 | 97.8160000 97.8160000 98.7402000 90.0000000 90.0000000 90.0000000 5 | -------------------------------------------------------------------------------- /Examples/Example_1/example_1.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | # ParaMol imports 4 | from ParaMol.System.system import * 5 | from ParaMol.MM_engines.openmm import * 6 | 7 | # ParaMol Tasks imports 8 | from ParaMol.Tasks.parametrization import * 9 | from ParaMol.Tasks.ab_initio_properties import * 10 | from ParaMol.Utils.settings import * 11 | 12 | # --------------------------------------------------------- # 13 | # Preparation # 14 | # --------------------------------------------------------- # 15 | # Create the OpenMM engine for carbon monoxide 16 | openmm_engine = OpenMMEngine(True, "AMBER", "co.prmtop", "AMBER", "co.inpcrd") 17 | 18 | # Create the ParaMol System 19 | co = ParaMolSystem("carbon_monoxide", openmm_engine, 2) 20 | 21 | # Create ParaMol's force field representation and ask to optimize bonds's parameters 22 | co.force_field.create_force_field(opt_bonds=True) 23 | 24 | # Create ParaMol settings instance 25 | paramol_settings = Settings() 26 | 27 | # --------------------------------------------------------- # 28 | # Perform the conformational sampling manually # 29 | # --------------------------------------------------------- # 30 | # Generate conformations; ParaMol uses nanometers for the length 31 | n_atoms = 2 32 | n_conformations = 100 33 | conformations = np.zeros((n_conformations, n_atoms, 3)) 34 | 35 | # Change the z distance of atom 2 36 | conformations[:, 1, 2] = np.linspace(0.1, 0.12, n_conformations) 37 | 38 | # Set this data in the ParaMol system instance 39 | co.ref_coordinates = conformations 40 | co.n_structures = len(co.ref_coordinates) 41 | 42 | # --------------------------------------------------------- # 43 | # Calculate QM energies and forces # 44 | # --------------------------------------------------------- # 45 | # Create the ASE calculator 46 | from ase.calculators.dftb import * 47 | 48 | calc = Dftb(Hamiltonian_='DFTB', 49 | Hamiltonian_MaxAngularMomentum_='', 50 | Hamiltonian_MaxAngularMomentum_O='p', 51 | Hamiltonian_MaxAngularMomentum_C='p', 52 | Hamiltonian_SCC='Yes', 53 | Hamiltonian_SCCTolerance=1e-8, 54 | Hamiltonian_MaxSCCIterations=10000) 55 | 56 | # Set the calculator in the settings; alternatively the QM engine could be created manually 57 | paramol_settings.qm_engine["ase"]["calculator"] = calc 58 | 59 | # Calculate Ab initio properties 60 | ab_initio = AbInitioProperties() 61 | ab_initio.run_task(paramol_settings, [co]) 62 | 63 | # Save coordinates, energies and forces into .nc file 64 | co.write_data("co_scan.nc") 65 | 66 | # --------------------------------------------------------- # 67 | # Parametrize the CO bond # 68 | # --------------------------------------------------------- # 69 | parametrization = Parametrization() 70 | optimal_paramters = parametrization.run_task(paramol_settings, [co]) 71 | -------------------------------------------------------------------------------- /Examples/Example_2/aniline.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 14 3 | 1.1720000 1.2030000 -0.0030000 -0.2210000 1.2080000 0.0050000 4 | -0.9390000 0.0000000 0.0100000 -0.2210000 -1.2080000 0.0050000 5 | 1.1720000 -1.2030000 -0.0030000 1.8820000 -0.0000000 -0.0080000 6 | 1.7060000 2.1500000 -0.0090000 -0.7630000 2.1520000 0.0130000 7 | -0.7630000 -2.1520000 0.0130000 1.7060000 -2.1500000 -0.0090000 8 | 2.9680000 -0.0000000 -0.0170000 -2.3370000 0.0000000 0.0790000 9 | -2.7780000 0.8350000 -0.2890000 -2.7780000 -0.8350000 -0.2890000 10 | -------------------------------------------------------------------------------- /Examples/Example_2/example_2.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.System.system import * 3 | from ParaMol.MM_engines.openmm import * 4 | 5 | # ParaMol Tasks imports 6 | from ParaMol.Tasks.resp_fitting import * 7 | from ParaMol.Utils.settings import * 8 | from ParaMol.Utils.gaussian_esp import * 9 | from ParaMol.Utils.Symmetrizers.amber_symmetrizer import * 10 | 11 | # --------------------------------------------------------- # 12 | # Preparation # 13 | # --------------------------------------------------------- # 14 | # Create the OpenMM engine for caffeine 15 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='aniline.prmtop', crd_format='AMBER', crd_file='aniline.inpcrd') 16 | 17 | # Create Molecular System 18 | aniline = ParaMolSystem(name="aniline", engine=openmm_system, n_atoms=14) 19 | 20 | # Create ParaMol's force field representation and ask to optimize charges 21 | aniline.force_field.create_force_field(opt_charges=True) 22 | 23 | # Create ParaMol settings instance 24 | paramol_settings = Settings() 25 | paramol_settings.properties["include_energies"] = False 26 | paramol_settings.properties["include_forces"] = False 27 | paramol_settings.properties["include_esp"] = True 28 | 29 | # --------------------------------------------------------- # 30 | # Read ESP Data into ParaMol # 31 | # --------------------------------------------------------- # 32 | gaussian_esp = GaussianESP() 33 | aniline.ref_coordinates, aniline.ref_esp_grid, aniline.ref_esp, aniline.ref_energies = gaussian_esp.read_log_files(["path_to_guassian_log_file"]) 34 | 35 | # --------------------------------------------------------- # 36 | # Symmetrize ParaMol ForceField # 37 | # --------------------------------------------------------- # 38 | # Symmetry ParaMol ForceField so that it respects symmetries 39 | # In this example, we are not setting any symmetry, but we still need to do this step as we want to save a .mol2 file 40 | amber_symmetrizer = AmberSymmetrizer(top_file="aniline.prmtop") 41 | amber_symmetrizer.get_symmetries(aniline.force_field) 42 | amber_symmetrizer.symmetrize_force_field(aniline.force_field) 43 | 44 | # Set number of structures 45 | aniline.n_structures = len(aniline.ref_coordinates) 46 | 47 | # --------------------------------------------------------- # 48 | # RESP Charge Fitting # 49 | # --------------------------------------------------------- # 50 | resp_fitting = RESPFitting() 51 | systems, parameter_space, objective_function, optimizer = resp_fitting.run_task(paramol_settings, [aniline], solver="scipy", total_charge=0) 52 | #systems, parameter_space, objective_function, optimizer = resp_fitting.run_task(paramol_settings, [aniline], solver="explicit", total_charge=0) 53 | 54 | # Write ParaMol Force Field file with final parameters 55 | aniline.force_field.write_ff_file("aniline_resp.ff") 56 | 57 | # Update amber symmetrizer and save .mol2 file 58 | amber_symmetrizer.update_term_types_parameters(parameter_space.optimizable_parameters) 59 | amber_symmetrizer.save("aniline_resp.mol2") 60 | -------------------------------------------------------------------------------- /Examples/Example_3/caffeine.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 24 3 | -1.3000000 -1.1180000 0.0000000 -1.8500000 0.1910000 0.0000000 4 | -1.0070000 1.3280000 0.0000000 0.0850000 -1.3840000 -0.0000000 5 | 0.9150000 -0.1930000 -0.0000000 0.3650000 1.1310000 0.0000000 6 | 2.3060000 -0.0390000 0.0000000 2.5400000 1.3360000 0.0000000 7 | 1.4010000 2.0790000 0.0000000 -1.5570000 2.6580000 -0.0000000 8 | -3.0920000 0.3390000 0.0000000 0.5180000 -2.5510000 -0.0000000 9 | 3.2810000 -1.0800000 0.0000000 -2.2470000 -2.2090000 0.0000000 10 | 3.5520000 1.7610000 0.0000000 -2.6790000 2.6030000 0.0000000 11 | -1.2070000 3.2080000 -0.9140000 -1.2070000 3.2080000 0.9140000 12 | 2.7640000 -2.0790000 0.0000000 3.9280000 -0.9950000 0.9150000 13 | 3.9280000 -0.9950000 -0.9150000 -2.8980000 -2.1400000 -0.9120000 14 | -2.8980000 -2.1400000 0.9120000 -1.6940000 -3.1860000 -0.0000000 15 | -------------------------------------------------------------------------------- /Examples/Example_3/example_3.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.System.system import * 3 | from ParaMol.MM_engines.openmm import * 4 | from ParaMol.Tasks.adaptive_parametrization import * 5 | from ParaMol.Utils.settings import * 6 | 7 | # --------------------------------------------------------- # 8 | # Preparation # 9 | # --------------------------------------------------------- # 10 | # Create the OpenMM engine for caffeine 11 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='caffeine.prmtop', crd_format='AMBER', crd_file='caffeine.inpcrd') 12 | 13 | # Create ParaMol System 14 | caffeine = ParaMolSystem(name="caffeine", engine=openmm_system, n_atoms=24) 15 | 16 | # Create ParaMol's force field representation and ask to parametrize bonds, angles and torsions 17 | caffeine.force_field.create_force_field(opt_bonds=True, opt_angles=True, opt_torsions=True) 18 | 19 | # Create ParaMol settings instance 20 | paramol_settings = Settings() 21 | 22 | # The objective function will contain a energy, force and regularization term 23 | paramol_settings.properties["include_energies"] = True 24 | paramol_settings.properties["include_forces"] = True 25 | paramol_settings.properties["include_regularization"] = True 26 | 27 | # The QM engine used will be ParaMol's AMBER sqm wrapper 28 | paramol_settings.qm_engine["qm_engine"] = "amber" 29 | 30 | # --------------------------------------------------------- # 31 | # Adaptive Parametrization # 32 | # --------------------------------------------------------- # 33 | adaptive_parametrization = AdaptiveParametrization() 34 | adaptive_parametrization.run_task(paramol_settings, [caffeine], rmsd_tol=0.0001, max_iter=100, structures_per_iter=100, ) 35 | 36 | # Write ParaMol Force Field file with final parameters 37 | caffeine.force_field.write_ff_file("caffeine_adaptive_param.ff") -------------------------------------------------------------------------------- /Examples/Example_3/example_3_quality.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | 4 | # ParaMol imports 5 | from ParaMol.Utils.settings import * 6 | from ParaMol.System.system import * 7 | from ParaMol.MM_engines.openmm import * 8 | from ParaMol.QM_engines.qm_engine import * 9 | from ParaMol.Tasks.adaptive_parametrization import * 10 | from ParaMol.Utils.conformational_sampling import conformational_sampling 11 | 12 | # --------------------------------------------------------- # 13 | # Preparation # 14 | # --------------------------------------------------------- # 15 | # Create OpenMM system engine 16 | # Create the OpenMM engine for caffeine 17 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='caffeine.prmtop', crd_format='AMBER', crd_file='caffeine.inpcrd') 18 | 19 | # Create ParaMol System 20 | caffeine = ParaMolSystem(name="caffeine", engine=openmm_system, n_atoms=24) 21 | 22 | # Create ParaMol's force field representation and ask to parametrize bonds, angles and torsions 23 | caffeine.force_field.create_force_field(opt_bonds=True, opt_angles=True, opt_torsions=True) 24 | 25 | # Create ParaMol settings instance 26 | paramol_settings = Settings() 27 | 28 | # The objective function will contain a energy, force and regularization term 29 | paramol_settings.properties["include_energies"] = True 30 | paramol_settings.properties["include_forces"] = True 31 | paramol_settings.properties["include_regularization"] = True 32 | 33 | # The QM engine used will be ParaMol's AMBER sqm wrapper 34 | paramol_settings.qm_engine["qm_engine"] = "amber" 35 | 36 | # Make a copy of the original force_field dict. 37 | # It will be useful later to assess the quality of the re-parametrized force field. 38 | force_field_original = copy.deepcopy(caffeine.force_field.force_field) 39 | # --------------------------------------------------------- # 40 | # Adaptive Parametrization # 41 | # --------------------------------------------------------- # 42 | adaptive_parametrization = AdaptiveParametrization() 43 | adaptive_parametrization.run_task(paramol_settings, [caffeine], rmsd_tol=0.0001, max_iter=100, structures_per_iter=100, ) 44 | 45 | # Write ParaMol Force Field file with final parameters 46 | caffeine.force_field.write_ff_file("caffeine_adaptive_param.ff") 47 | 48 | # --------------------------------------------------------- # 49 | # Quality of the Parametrization # 50 | # --------------------------------------------------------- # 51 | # Perform conformational sampling 52 | conformational_sampling(paramol_settings, [caffeine], n_conf=1000, steps_integrator=1000) 53 | 54 | # Calculate MM energies and forces after the re-parametrization 55 | mm_energies_after = caffeine.get_energies_ensemble() 56 | mm_forces_after = caffeine.get_forces_ensemble() 57 | 58 | # Re-set original parameters 59 | caffeine.engine.set_nonbonded_parameters(force_field_original) 60 | caffeine.engine.set_bonded_parameters(force_field_original) 61 | 62 | # Calculate MM energies and forces before the re-parametrization 63 | mm_energies_before = caffeine.get_energies_ensemble() 64 | mm_forces_before = caffeine.get_forces_ensemble() 65 | 66 | # Plot the data 67 | plt.title("Quality of the energies") 68 | plt.scatter(mm_energies_before-np.mean(mm_energies_before), caffeine.ref_energies-np.mean(caffeine.ref_energies), s=1, label="Before re-parametrization", color="red") 69 | plt.scatter(mm_energies_after-np.mean(mm_energies_after), caffeine.ref_energies-np.mean(caffeine.ref_energies), s=1, label="After re-parametrization", color="green") 70 | plt.plot(np.arange(-200,200), np.arange(-200,200), color="black") 71 | plt.ylabel("QM Energy (kJ/mol)") 72 | plt.xlabel("MM Energy (kJ/mol)") 73 | plt.legend() 74 | plt.show() 75 | 76 | # Quality of the forces 77 | atom_idx = 10 78 | direction = 0 #x=0, y=1, z=2 79 | plt.title("Quality of the atom {} force along direction {}".format(atom_idx, direction)) 80 | plt.scatter(mm_forces_before[:,atom_idx,0], caffeine.ref_forces[:, atom_idx, 0], s=1, color="red", label="Before re-parametrization") 81 | plt.scatter(mm_forces_after[:,atom_idx,0], caffeine.ref_forces[:, atom_idx, 0], s=1, color="green", label="After re-parametrization") 82 | plt.plot(np.arange(-5000,5000), np.arange(-5000,5000), color="black") 83 | plt.ylabel("QM Force (kJ/mol/nm)") 84 | plt.xlabel("MM Force (kJ/mol/nm)") 85 | plt.legend() 86 | plt.show() -------------------------------------------------------------------------------- /Examples/Example_4/aspirin.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 21 3 | 0.1360000 -0.8220000 -6.0700000 0.3530000 -0.0670000 -5.1550000 4 | 0.1660000 1.4170000 -5.1510000 0.8110000 -0.5300000 -3.8970000 5 | 1.0720000 -1.9040000 -3.7740000 1.7720000 -2.6040000 -4.7650000 6 | 2.0580000 -3.9540000 -4.5650000 1.6710000 -4.5960000 -3.3840000 7 | 0.9930000 -3.8870000 -2.3940000 0.6830000 -2.5280000 -2.5700000 8 | -0.0610000 -1.7870000 -1.5270000 -0.4510000 -0.6340000 -1.5910000 9 | -0.3260000 -2.5320000 -0.3850000 1.1260000 1.9210000 -4.9850000 10 | -0.5070000 1.7120000 -4.3370000 -0.2530000 1.7580000 -6.1030000 11 | 2.0850000 -2.1000000 -5.6860000 2.5990000 -4.5140000 -5.3380000 12 | 1.9030000 -5.6580000 -3.2360000 0.6910000 -4.3860000 -1.4640000 13 | -0.8250000 -1.9540000 0.2330000 14 | -------------------------------------------------------------------------------- /Examples/Example_4/aspirin_reference_data.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/Examples/Example_4/aspirin_reference_data.nc -------------------------------------------------------------------------------- /Examples/Example_4/example_4_parallel.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.Utils.settings import * 3 | from ParaMol.System.system import * 4 | from ParaMol.MM_engines.openmm import * 5 | from ParaMol.QM_engines.qm_engine import * 6 | from ParaMol.Tasks.parametrization import * 7 | from ParaMol.Utils.Symmetrizers.amber_symmetrizer import * 8 | 9 | # --------------------------------------------------------- # 10 | # Preparation # 11 | # --------------------------------------------------------- # 12 | # Create the OpenMM engine for aspirin 13 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='aspirin.prmtop', crd_format='AMBER', crd_file='aspirin.inpcrd') 14 | 15 | # Create ParaMol System 16 | # Note that number of cpus was set to 4 17 | aspirin = ParaMolSystem(name="aspirin", engine=openmm_system, n_atoms=21, n_cpus=4) 18 | 19 | # Create ParaMol's force field representation and ask to parametrize bonds, angles and torsions 20 | aspirin.force_field.create_force_field(opt_bonds=True, opt_angles=True, opt_torsions=True) 21 | 22 | # Create ParaMol settings instance 23 | paramol_settings = Settings() 24 | 25 | # The objective function will contain a energy, force and regularization term 26 | paramol_settings.properties["include_energies"] = True 27 | paramol_settings.properties["include_forces"] = True 28 | paramol_settings.properties["include_regularization"] = True 29 | 30 | # Set the objective function to be calculated in parallel 31 | paramol_settings.objective_function["parallel"] = True 32 | 33 | # Read conformations, energies and forces from NETCDF ParaMol file format 34 | aspirin.read_data("aspirin_reference_data.nc") 35 | # --------------------------------------------------------- # 36 | # Symmetrize ParaMol ForceField # 37 | # --------------------------------------------------------- # 38 | # Symmetry ParaMol ForceField so that it respects atom-type symmetries 39 | amber_symmetrizer = AmberSymmetrizer(top_file="aspirin.prmtop") 40 | amber_symmetrizer.get_symmetries(aspirin.force_field) 41 | amber_symmetrizer.symmetrize_force_field(aspirin.force_field) 42 | 43 | # Write symmetrized Force-Field to file 44 | aspirin.force_field.write_ff_file("aspirin_sym.ff") 45 | # --------------------------------------------------------- # 46 | # Parametrization # 47 | # --------------------------------------------------------- # 48 | parametrization = Parametrization() 49 | systems, parameter_space, objective_function, optimizer = parametrization.run_task(paramol_settings, [aspirin]) 50 | 51 | # Write ParaMol Force Field file with final parameters 52 | aspirin.force_field.write_ff_file("aspirin_symm_opt.ff") 53 | 54 | # Update AMBER symmetrizer with new parameters 55 | amber_symmetrizer.update_term_types_parameters(parameter_space.optimizable_parameters) 56 | 57 | # Write AMBER topology file (.prmtop) 58 | amber_symmetrizer.save("aspirin_opt.prmtop") 59 | amber_symmetrizer.save_frcmod("aspirin_opt.frcmod") -------------------------------------------------------------------------------- /Examples/Example_4/example_4_serial.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.Utils.settings import * 3 | from ParaMol.System.system import * 4 | from ParaMol.MM_engines.openmm import * 5 | from ParaMol.QM_engines.qm_engine import * 6 | from ParaMol.Tasks.parametrization import * 7 | from ParaMol.Utils.Symmetrizers.amber_symmetrizer import * 8 | 9 | # --------------------------------------------------------- # 10 | # Preparation # 11 | # --------------------------------------------------------- # 12 | # Create the OpenMM engine for aspirin 13 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='aspirin.prmtop', crd_format='AMBER', crd_file='aspirin.inpcrd') 14 | 15 | # Create ParaMol System 16 | aspirin = ParaMolSystem(name="aspirin", engine=openmm_system, n_atoms=21) 17 | 18 | # Create ParaMol's force field representation and ask to parametrize bonds, angles and torsions 19 | aspirin.force_field.create_force_field(opt_bonds=True, opt_angles=True, opt_torsions=True) 20 | 21 | # Create ParaMol settings instance 22 | paramol_settings = Settings() 23 | 24 | # The objective function will contain a energy, force and regularization term 25 | paramol_settings.properties["include_energies"] = True 26 | paramol_settings.properties["include_forces"] = True 27 | paramol_settings.properties["include_regularization"] = True 28 | 29 | # Read conformations, energies and forces from NETCDF ParaMol file format 30 | aspirin.read_data("aspirin_reference_data.nc") 31 | # --------------------------------------------------------- # 32 | # Symmetrize ParaMol ForceField # 33 | # --------------------------------------------------------- # 34 | # Symmetry ParaMol ForceField so that it respects atom-type symmetries 35 | amber_symmetrizer = AmberSymmetrizer(top_file="aspirin.prmtop") 36 | amber_symmetrizer.get_symmetries(aspirin.force_field) 37 | amber_symmetrizer.symmetrize_force_field(aspirin.force_field) 38 | 39 | # Write symmetrized Force-Field to file 40 | aspirin.force_field.write_ff_file("aspirin_sym.ff") 41 | # --------------------------------------------------------- # 42 | # Parametrization # 43 | # --------------------------------------------------------- # 44 | parametrization = Parametrization() 45 | systems, parameter_space, objective_function, optimizer = parametrization.run_task(paramol_settings, [aspirin]) 46 | 47 | # Write ParaMol Force Field file with final parameters 48 | aspirin.force_field.write_ff_file("aspirin_symm_opt.ff") 49 | 50 | # Update AMBER symmetrizer with new parameters 51 | amber_symmetrizer.update_term_types_parameters(parameter_space.optimizable_parameters) 52 | 53 | # Write AMBER topology file (.prmtop) 54 | amber_symmetrizer.save("aspirin_opt.prmtop") 55 | amber_symmetrizer.save_frcmod("aspirin_opt.frcmod") 56 | 57 | 58 | -------------------------------------------------------------------------------- /Examples/Example_5/example_5.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.System.system import * 3 | from ParaMol.MM_engines.openmm import * 4 | from ParaMol.QM_engines.qm_engine import * 5 | 6 | # ParaMol Tasks imports 7 | from ParaMol.Tasks.parametrization import * 8 | from ParaMol.Tasks.torsions_scan import * 9 | from ParaMol.Utils.settings import * 10 | from ParaMol.Utils.Symmetrizers.amber_symmetrizer import * 11 | 12 | # --------------------------------------------------------- # 13 | # Preparation # 14 | # --------------------------------------------------------- # 15 | # Create the OpenMM engine for norfloxacin 16 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='norfloxacin.prmtop', crd_format='AMBER', crd_file='norfloxacin.inpcrd') 17 | 18 | # Create ParaMol System 19 | norfloxacin = ParaMolSystem(name="norfloxacin", engine=openmm_system, n_atoms=41) 20 | 21 | # Create ParaMol's force field representation 22 | norfloxacin.force_field.create_force_field(ff_file="norfloxacin_symm.ff") 23 | 24 | # Create ParaMol settings instance 25 | paramol_settings = Settings() 26 | 27 | # The objective function will contain an energy and a regularization term 28 | paramol_settings.properties["include_energies"] = True 29 | paramol_settings.properties["include_forces"] = False # One should not include forces when a torsional scan 30 | paramol_settings.properties["include_regularization"] = True 31 | # --------------------------------------------------------- # 32 | # Symmetrize ParaMol ForceField # 33 | # --------------------------------------------------------- # 34 | # Symmetry ParaMol ForceField so that it respects atom-type symmetries 35 | amber_symmetrizer = AmberSymmetrizer(top_file="norfloxacin.prmtop") 36 | amber_symmetrizer.get_symmetries() 37 | # Do not set force field to amber_format as we are already reading it with the correct symmetries from the "norfloxacin_symm.ff" 38 | # amber_symmetrizer.set_force_field_to_amber_format(norfloxacin.force_field) 39 | 40 | # --------------------------------------------------------- # 41 | # Set the QM Engine # 42 | # --------------------------------------------------------- # 43 | # Create the ASE calculator 44 | from ase.calculators.dftb import * 45 | 46 | calc = Dftb(Hamiltonian_='DFTB', # line is included by default 47 | Hamiltonian_MaxAngularMomentum_='', 48 | Hamiltonian_MaxAngularMomentum_H='s', 49 | Hamiltonian_MaxAngularMomentum_O='p', 50 | Hamiltonian_MaxAngularMomentum_C='p', 51 | Hamiltonian_MaxAngularMomentum_N="p", 52 | Hamiltonian_Dispersion="DftD3 { \n s6=1.000 \n s8=0.5883 \n Damping = BeckeJohnson { \n a1=0.5719 \n a2=3.6017 \n } \n }", 53 | Hamiltonian_SCC='Yes', 54 | Hamiltonian_SCCTolerance=1e-8, ) 55 | 56 | # Alternative, we could set the calculator in the settings 57 | paramol_settings.qm_engine["ase"]["calculator"] = calc 58 | 59 | # --------------------------------------------------------- # 60 | # Perform the Torsional Scan # 61 | # --------------------------------------------------------- # 62 | torsion_to_scan = [[7, 4, 11, 15]] 63 | scan_settings = [[-180.0, 180.0, 90.0]] 64 | torsion_scan = TorsionScan() 65 | torsion_scan.run_task(paramol_settings, [norfloxacin], torsion_to_scan, scan_settings, optimize_qm_before_scan=True) 66 | 67 | # Save coordinates and energies into .nc file 68 | norfloxacin.write_data("norfloxacin_scan.nc") 69 | 70 | # --------------------------------------------------------- # 71 | # Parametrize the Torsion # 72 | # --------------------------------------------------------- # 73 | parametrization = Parametrization() 74 | systems, parameter_space, objective_function, optimizer = parametrization.run_task(paramol_settings, [norfloxacin]) 75 | 76 | # Update AMBER symmetrizer with new parameters 77 | amber_symmetrizer.update_term_types_parameters(parameter_space.optimizable_parameters) 78 | 79 | # Write AMBER topology file (.prmtop) and .frcmod file 80 | amber_symmetrizer.save("norfloxacin_opt.prmtop") 81 | amber_symmetrizer.save_frcmod("norfloxacin_opt.frcmod") 82 | -------------------------------------------------------------------------------- /Examples/Example_5/example_5_alternative.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.System.system import * 3 | from ParaMol.MM_engines.openmm import * 4 | from ParaMol.QM_engines.qm_engine import * 5 | 6 | # ParaMol Tasks imports 7 | from ParaMol.Tasks.parametrization import * 8 | from ParaMol.Tasks.torsions_scan import * 9 | from ParaMol.Utils.settings import * 10 | from ParaMol.Utils.Symmetrizers.amber_symmetrizer import * 11 | 12 | # --------------------------------------------------------- # 13 | # Preparation # 14 | # --------------------------------------------------------- # 15 | # Create the OpenMM engine for norfloxacin 16 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='norfloxacin.prmtop', crd_format='AMBER', crd_file='norfloxacin.inpcrd') 17 | 18 | # Create ParaMol System 19 | norfloxacin = ParaMolSystem(name="norfloxacin", engine=openmm_system, n_atoms=41) 20 | 21 | # Create ParaMol's force field representation 22 | norfloxacin.force_field.create_force_field() 23 | 24 | # Create ParaMol settings instance 25 | paramol_settings = Settings() 26 | 27 | # The objective function will contain an energy and a regularization term 28 | paramol_settings.properties["include_energies"] = True 29 | paramol_settings.properties["include_forces"] = False # One should not include forces when a torsional scan 30 | paramol_settings.properties["include_regularization"] = True 31 | 32 | # --------------------------------------------------------- # 33 | # Symmetrize ParaMol ForceField # 34 | # --------------------------------------------------------- # 35 | # Symmetry ParaMol ForceField so that it respects atom-type symmetries 36 | amber_symmetrizer = AmberSymmetrizer(top_file="norfloxacin.prmtop") 37 | amber_symmetrizer.get_symmetries() 38 | amber_symmetrizer.symmetrize_force_field(norfloxacin.force_field) 39 | 40 | # --------------------------------------------------------- # 41 | # Set the QM Engine # 42 | # --------------------------------------------------------- # 43 | # Create the ASE calculator 44 | from ase.calculators.dftb import * 45 | 46 | calc = Dftb(Hamiltonian_='DFTB', # line is included by default 47 | Hamiltonian_MaxAngularMomentum_='', 48 | Hamiltonian_MaxAngularMomentum_H='s', 49 | Hamiltonian_MaxAngularMomentum_O='p', 50 | Hamiltonian_MaxAngularMomentum_C='p', 51 | Hamiltonian_MaxAngularMomentum_N="p", 52 | Hamiltonian_Dispersion="DftD3 { \n s6=1.000 \n s8=0.5883 \n Damping = BeckeJohnson { \n a1=0.5719 \n a2=3.6017 \n } \n }", 53 | Hamiltonian_SCC='Yes', 54 | Hamiltonian_SCCTolerance=1e-8, ) 55 | 56 | # Alternative, we could set the calculator in the settings 57 | paramol_settings.qm_engine["ase"]["calculator"] = calc 58 | 59 | # --------------------------------------------------------- # 60 | # Perform the Torsional Scan # 61 | # --------------------------------------------------------- # 62 | torsion_to_scan = [[7, 4, 11, 15]] 63 | scan_settings = [[-180.0, 180.0, 90.0]] 64 | torsion_scan = TorsionScan() 65 | torsion_scan.run_task(paramol_settings, [norfloxacin], torsion_to_scan, scan_settings, optimize_qm_before_scan=True) 66 | 67 | # Save coordinates and energies into .nc file 68 | norfloxacin.write_data("norfloxacin_scan.nc") 69 | # --------------------------------------------------------- # 70 | # Parametrize the Torsion # 71 | # --------------------------------------------------------- # 72 | norfloxacin.force_field.optimize_torsions_by_symmetry(torsion_to_scan) 73 | norfloxacin.force_field.write_ff_file("norfloxacin_symm.ff") 74 | 75 | parametrization = Parametrization() 76 | systems, parameter_space, objective_function, optimizer = parametrization.run_task(paramol_settings, [norfloxacin]) 77 | 78 | # Update AMBER symmetrizer with new parameters 79 | amber_symmetrizer.update_term_types_parameters(parameter_space.optimizable_parameters) 80 | 81 | # Write AMBER topology file (.prmtop) and .frcmod file 82 | amber_symmetrizer.save("norfloxacin_opt.prmtop") 83 | amber_symmetrizer.save_frcmod("norfloxacin_opt.frcmod") -------------------------------------------------------------------------------- /Examples/Example_5/example_5_write_ff.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.System.system import * 3 | from ParaMol.MM_engines.openmm import * 4 | from ParaMol.Utils.Symmetrizers.amber_symmetrizer import * 5 | 6 | # --------------------------------------------------------- # 7 | # Preparation # 8 | # --------------------------------------------------------- # 9 | # Create the OpenMM engine for norfloxacin 10 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='norfloxacin.prmtop', crd_format='AMBER', crd_file='norfloxacin.inpcrd') 11 | 12 | # Create ParaMol System 13 | norfloxacin = ParaMolSystem(name="norfloxacin", engine=openmm_system, n_atoms=41) 14 | 15 | # Create ParaMol's force field representation 16 | norfloxacin.force_field.create_force_field() 17 | 18 | # --------------------------------------------------------- # 19 | # Symmetrize ParaMol ForceField # 20 | # --------------------------------------------------------- # 21 | # Symmetry ParaMol ForceField so that it respects atom-type symmetries 22 | amber_symmetrizer = AmberSymmetrizer(top_file="norfloxacin.prmtop") 23 | amber_symmetrizer.get_symmetries() 24 | amber_symmetrizer.symmetrize_force_field(norfloxacin.force_field) 25 | 26 | # Write symmetrized Force-Field to file 27 | norfloxacin.force_field.write_ff_file("norfloxacin_symm.ff") 28 | -------------------------------------------------------------------------------- /Examples/Example_5/norfloxacin.inpcrd: -------------------------------------------------------------------------------- 1 | 2 | 41 0.0000000e+00 3 | 10.9470000 12.4890000 8.0990000 6.7730000 10.0210000 7.8680000 4 | 4.9320000 8.1120000 8.3310000 5.4380000 6.5770000 9.8950000 5 | 12.7030000 11.4300000 9.8380000 15.4400000 12.2230000 10.2700000 6 | 9.1550000 8.2160000 10.6780000 13.3440000 12.4020000 8.9760000 7 | 13.4940000 10.9170000 10.9360000 14.8410000 12.1430000 8.9480000 8 | 14.5210000 11.9450000 11.3560000 11.4370000 10.9510000 9.5790000 9 | 9.6540000 9.3300000 10.0010000 10.9480000 9.8180000 10.2680000 10 | 8.8340000 9.9600000 9.0320000 10.6020000 11.5910000 8.6230000 11 | 9.3370000 11.0920000 8.3620000 9.9570000 7.5310000 11.6800000 12 | 7.4810000 9.4630000 8.7030000 7.9230000 7.7110000 10.3870000 13 | 7.0730000 8.2580000 9.4520000 10.9680000 6.6070000 11.0380000 14 | 5.7770000 7.5770000 9.2650000 4.1190000 7.5640000 8.3140000 15 | 15.9230000 13.1250000 10.4170000 12.9400000 12.3170000 7.9480000 16 | 13.1390000 13.4490000 9.3160000 12.8320000 10.6920000 11.7990000 17 | 13.9980000 9.9550000 10.6630000 15.3390000 12.8740000 8.2830000 18 | 15.0190000 11.1350000 8.5000000 15.0820000 11.5730000 12.2430000 19 | 13.9870000 12.8710000 11.6940000 11.5890000 9.3070000 10.9920000 20 | 8.6870000 11.5790000 7.6230000 10.4600000 8.2750000 12.3280000 21 | 9.2750000 6.9490000 12.3300000 7.6130000 6.8150000 10.9490000 22 | 11.5630000 6.0990000 11.8050000 11.6490000 7.1630000 10.3840000 23 | 10.4630000 5.8450000 10.4330000 24 | -------------------------------------------------------------------------------- /Examples/Example_7/ethane.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 8 3 | 0.0000000 0.0000000 0.7650000 0.5100000 0.8840000 1.1650000 4 | 0.5110000 -0.8840000 1.1650000 -1.0210000 -0.0000000 1.1650000 5 | 0.0000000 0.0000000 -0.7650000 1.0210000 -0.0000000 -1.1650000 6 | -0.5110000 -0.8840000 -1.1650000 -0.5100000 0.8840000 -1.1650000 7 | -------------------------------------------------------------------------------- /Examples/Example_7/example_7.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.System.system import * 3 | from ParaMol.MM_engines.openmm import * 4 | from ParaMol.QM_engines.qm_engine import * 5 | 6 | # ParaMol Tasks imports 7 | from ParaMol.Tasks.parametrization import * 8 | from ParaMol.Tasks.torsions_scan import * 9 | from ParaMol.Utils.settings import * 10 | from ParaMol.Utils.conformational_sampling import * 11 | 12 | # --------------------------------------------------------- # 13 | # Settings # 14 | # --------------------------------------------------------- # 15 | # Create ParaMol settings instance 16 | paramol_settings = Settings() 17 | 18 | # The objective function will contain an energy and a regularization term 19 | paramol_settings.properties["include_energies"] = True 20 | paramol_settings.properties["include_forces"] = False 21 | paramol_settings.properties["include_regularization"] = True 22 | 23 | # --------------------------------------------------------- # 24 | # Preparation # 25 | # --------------------------------------------------------- # 26 | # Create the OpenMM engine for ethane 27 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='ethane.prmtop', crd_format='AMBER', crd_file='ethane.inpcrd') 28 | 29 | # Create ethane ParaMol System 30 | ethane = ParaMolSystem(name="ethane", engine=openmm_system, n_atoms=8) 31 | 32 | # Create ParaMol's force field representation 33 | ethane.force_field.create_force_field(ff_file="ethane_sym.ff") 34 | 35 | # Create the OpenMM engine for propane 36 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='propane.prmtop', crd_format='AMBER', crd_file='propane.inpcrd') 37 | 38 | # Create propane ParaMol System 39 | propane = ParaMolSystem(name="propane", engine=openmm_system, n_atoms=11) 40 | 41 | # Create ParaMol's force field representation 42 | propane.force_field.create_force_field(ff_file="propane_sym.ff") 43 | 44 | # --------------------------------------------------------- # 45 | # Set the QM Engine # 46 | # --------------------------------------------------------- # 47 | # Create the ASE calculator 48 | from ase.calculators.dftb import * 49 | 50 | calc = Dftb(Hamiltonian_='DFTB', # line is included by default 51 | Hamiltonian_MaxAngularMomentum_='', 52 | Hamiltonian_MaxAngularMomentum_H='s', 53 | Hamiltonian_MaxAngularMomentum_O='p', 54 | Hamiltonian_MaxAngularMomentum_C='p', 55 | Hamiltonian_MaxAngularMomentum_N="p", 56 | Hamiltonian_Dispersion="DftD3 { \n s6=1.000 \n s8=0.5883 \n Damping = BeckeJohnson { \n a1=0.5719 \n a2=3.6017 \n } \n }", 57 | Hamiltonian_SCC='Yes', 58 | Hamiltonian_SCCTolerance=1e-8, ) 59 | 60 | # Alternative, we could set the calculator in the settings 61 | paramol_settings.qm_engine["ase"]["calculator"] = calc 62 | 63 | # --------------------------------------------------------- # 64 | # Conformational Sampling # 65 | # --------------------------------------------------------- # 66 | systems = [ethane, propane] 67 | 68 | # Perform conformational sampling 69 | conformational_sampling(paramol_settings, systems, 1000, 1000) 70 | 71 | # --------------------------------------------------------- # 72 | # Parameter Optimization # 73 | # --------------------------------------------------------- # 74 | parametrization = Parametrization() 75 | systems, parameter_space, objective_function, optimizer = parametrization.run_task(paramol_settings, systems) 76 | 77 | # Write final ParaMol FFs 78 | ethane.force_field.write_ff_file("ethane_optimized.ff") 79 | propane.force_field.write_ff_file("propane_optimized.ff") -------------------------------------------------------------------------------- /Examples/Example_7/example_7_write_ff.py: -------------------------------------------------------------------------------- 1 | # ParaMol imports 2 | from ParaMol.System.system import * 3 | from ParaMol.MM_engines.openmm import * 4 | 5 | # --------------------------------------------------------- # 6 | # Preparation # 7 | # --------------------------------------------------------- # 8 | # Create the OpenMM engine for ethane 9 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='ethane.prmtop', crd_format='AMBER', crd_file='ethane.inpcrd') 10 | 11 | # Create ethane ParaMol System 12 | ethane = ParaMolSystem(name="ethane", engine=openmm_system, n_atoms=8) 13 | 14 | # Create ParaMol's force field representation 15 | ethane.force_field.create_force_field() 16 | 17 | # Create the OpenMM engine for propane 18 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='propane.prmtop', crd_format='AMBER', crd_file='propane.inpcrd') 19 | 20 | # Create propane ParaMol System 21 | propane = ParaMolSystem(name="propane", engine=openmm_system, n_atoms=11) 22 | 23 | # Create ParaMol's force field representation 24 | propane.force_field.create_force_field() 25 | 26 | # --------------------------------------------------------- # 27 | # Save ParaMol ForceField # 28 | # --------------------------------------------------------- # 29 | ethane.force_field.write_ff_file("ethane.ff") 30 | propane.force_field.write_ff_file("propane.ff") 31 | -------------------------------------------------------------------------------- /Examples/Example_7/propane.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 11 3 | -1.2770000 -0.2600000 0.0000000 -2.1770000 0.3670000 -0.0000000 4 | -1.3220000 -0.9070000 0.8850000 -1.3220000 -0.9070000 -0.8850000 5 | 0.0000000 0.5870000 0.0000000 -0.0000000 1.2470000 0.8780000 6 | 0.0000000 1.2470000 -0.8780000 1.2770000 -0.2600000 0.0000000 7 | 1.3220000 -0.9070000 0.8850000 1.3220000 -0.9080000 -0.8850000 8 | 2.1770000 0.3670000 -0.0000000 9 | -------------------------------------------------------------------------------- /Examples/Example_8/aniline.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 14 3 | 2.9720000 -0.0000000 -0.0050000 1.8740000 -0.0000000 -0.0010000 4 | 1.1710000 -1.2040000 0.0010000 1.7200000 -2.1580000 -0.0000000 5 | -0.2190000 -1.2160000 0.0070000 -0.7540000 -2.1770000 0.0050000 6 | -0.9430000 0.0000000 0.0020000 -2.3400000 -0.0000000 -0.0880000 7 | -2.7710000 -0.8310000 0.2520000 -2.7710000 0.8310000 0.2520000 8 | -0.2190000 1.2160000 0.0070000 -0.7540000 2.1770000 0.0050000 9 | 1.1710000 1.2040000 0.0010000 1.7200000 2.1580000 -0.0000000 10 | -------------------------------------------------------------------------------- /Examples/Example_8/example_8_parallel.py: -------------------------------------------------------------------------------- 1 | import simtk.unit as unit 2 | import multiprocessing as mp 3 | 4 | # ParaMol imports 5 | from ParaMol.System.system import * 6 | 7 | # ParaMol Tasks imports 8 | from ParaMol.HMC.hmc_sampler import * 9 | from ParaMol.Utils.settings import * 10 | 11 | # --------------------------------------------------------- # 12 | # Preparation # 13 | # --------------------------------------------------------- # 14 | system_names = ["aniline_{}".format(i) for i in range(4)] 15 | systems = [] 16 | 17 | # Create four identical aniline systems 18 | for name in system_names: 19 | # Create the OpenMM engine for aniline 20 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='aniline.prmtop', crd_format="AMBER", crd_file='aniline.inpcrd') 21 | 22 | # Create ParaMol System 23 | systems.append(ParaMolSystem(name=name, engine=openmm_system, n_atoms=14)) 24 | 25 | # Create ParaMol settings instance 26 | paramol_settings = Settings() 27 | 28 | # --------------------------------------------------------- # 29 | # Set the QM Engine # 30 | # --------------------------------------------------------- # 31 | # Create the ASE calculator 32 | from ase.calculators.dftb import * 33 | 34 | calc = Dftb(Hamiltonian_='DFTB', # line is included by default 35 | Hamiltonian_MaxSCCIterations=1000, 36 | Hamiltonian_MaxAngularMomentum_='', 37 | Hamiltonian_MaxAngularMomentum_H='s', 38 | Hamiltonian_MaxAngularMomentum_C='p', 39 | Hamiltonian_MaxAngularMomentum_N="p", 40 | Hamiltonian_Dispersion="DftD3 { \n s6=1.000 \n s8=0.5883 \n Damping = BeckeJohnson { \n a1=0.5719 \n a2=3.6017 \n } \n }", 41 | Hamiltonian_SCC='Yes', 42 | Hamiltonian_SCCTolerance=1e-8, ) 43 | 44 | # Set the calculator in the settings 45 | paramol_settings.qm_engine["ase"]["calculator"] = calc 46 | 47 | # -------------------------------------------------------------- # 48 | # Perform the nMC-MC Parallel Sampling # 49 | # -------------------------------------------------------------- # 50 | HMC_samplers = [HMCSampler() for n in range(len(systems))] 51 | output = mp.Queue() 52 | processes_pool = [] 53 | 54 | for system, sampler in zip(systems, HMC_samplers): 55 | hmc_kwargs = {"settings": paramol_settings, 56 | "systems": [system], 57 | "n_sweeps": 10000, 58 | "n_steps_per_sweep": 100, 59 | "temperature_pot_qm": unit.Quantity(300, unit.kelvin), 60 | "temperature_pot_mm": unit.Quantity(300, unit.kelvin), 61 | "temperature_kin_mm": unit.Quantity(300, unit.kelvin)} 62 | 63 | processes_pool.append(mp.Process(target=sampler.run_task, kwargs=hmc_kwargs)) 64 | 65 | # Run processes 66 | for sampler, system in zip(processes_pool, systems): 67 | print("Starting HMC sampler of system {}".format(system.name)) 68 | sampler.start() 69 | 70 | # Exit the completed processes 71 | for sampler in processes_pool: 72 | sampler.join() 73 | 74 | # Write final data into file 75 | for system in systems: 76 | system.write_data() 77 | 78 | 79 | -------------------------------------------------------------------------------- /Examples/Example_8/example_8_serial.py: -------------------------------------------------------------------------------- 1 | import simtk.unit as unit 2 | 3 | # ParaMol imports 4 | from ParaMol.System.system import * 5 | 6 | # ParaMol Tasks imports 7 | from ParaMol.HMC.hmc_sampler import * 8 | from ParaMol.Utils.settings import * 9 | 10 | # --------------------------------------------------------- # 11 | # Preparation # 12 | # --------------------------------------------------------- # 13 | # Create the OpenMM engine for aniline 14 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='aniline.prmtop', crd_format='AMBER', crd_file='aniline.inpcrd') 15 | 16 | # Create ParaMol System 17 | aniline = ParaMolSystem(name="aniline", engine=openmm_system, n_atoms=14) 18 | 19 | # Create ParaMol settings instance 20 | paramol_settings = Settings() 21 | 22 | # --------------------------------------------------------- # 23 | # Set the QM Engine # 24 | # --------------------------------------------------------- # 25 | # Create the ASE calculator 26 | from ase.calculators.dftb import * 27 | 28 | calc = Dftb(Hamiltonian_='DFTB', # line is included by default 29 | Hamiltonian_MaxSCCIterations=1000, 30 | Hamiltonian_MaxAngularMomentum_='', 31 | Hamiltonian_MaxAngularMomentum_H='s', 32 | Hamiltonian_MaxAngularMomentum_C='p', 33 | Hamiltonian_MaxAngularMomentum_N="p", 34 | Hamiltonian_Dispersion="DftD3 { \n s6=1.000 \n s8=0.5883 \n Damping = BeckeJohnson { \n a1=0.5719 \n a2=3.6017 \n } \n }", 35 | Hamiltonian_SCC='Yes', 36 | Hamiltonian_SCCTolerance=1e-8, ) 37 | 38 | # Set the calculator in the settings 39 | paramol_settings.qm_engine["ase"]["calculator"] = calc 40 | 41 | # --------------------------------------------------------- # 42 | # Perform the nMC-MC Sampling # 43 | # --------------------------------------------------------- # 44 | hmc_sampler = HMCSampler() 45 | 46 | hmc_sampler.run_task(paramol_settings, [aniline], n_sweeps=10000, n_steps_per_sweep=100, 47 | temperature_pot_qm=unit.Quantity(300, unit.kelvin), 48 | temperature_pot_mm=unit.Quantity(300, unit.kelvin), 49 | temperature_kin_mm=unit.Quantity(300, unit.kelvin),) 50 | 51 | 52 | aniline.write_data("aniline_hmc.nc") 53 | -------------------------------------------------------------------------------- /Examples/Example_9/aniline.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 14 3 | 2.9720000 -0.0000000 -0.0050000 1.8740000 -0.0000000 -0.0010000 4 | 1.1710000 -1.2040000 0.0010000 1.7200000 -2.1580000 -0.0000000 5 | -0.2190000 -1.2160000 0.0070000 -0.7540000 -2.1770000 0.0050000 6 | -0.9430000 0.0000000 0.0020000 -2.3400000 -0.0000000 -0.0880000 7 | -2.7710000 -0.8310000 0.2520000 -2.7710000 0.8310000 0.2520000 8 | -0.2190000 1.2160000 0.0070000 -0.7540000 2.1770000 0.0050000 9 | 1.1710000 1.2040000 0.0010000 1.7200000 2.1580000 -0.0000000 10 | -------------------------------------------------------------------------------- /Examples/Example_9/example_9_serial_param.py: -------------------------------------------------------------------------------- 1 | import simtk.unit as unit 2 | 3 | # ParaMol imports 4 | from ParaMol.System.system import * 5 | 6 | # ParaMol Tasks imports 7 | from ParaMol.HMC.hmc_sampler import * 8 | from ParaMol.Utils.settings import * 9 | 10 | # --------------------------------------------------------- # 11 | # Preparation # 12 | # --------------------------------------------------------- # 13 | # Create the OpenMM engine for aniline 14 | openmm_system = OpenMMEngine(init_openmm=True, topology_format='AMBER', top_file='aniline.prmtop', crd_format='AMBER', crd_file='aniline.inpcrd') 15 | 16 | # Create ParaMol System 17 | aniline = ParaMolSystem(name="aniline", engine=openmm_system, n_atoms=14) 18 | 19 | # Create ParaMol's force field representation of aniline; let us optimize all bonded terms 20 | aniline.force_field.create_force_field(opt_angles=True, opt_bonds=True, opt_torsions=True, opt_lj=False, opt_charges=False) 21 | 22 | # Create ParaMol settings instance 23 | paramol_settings = Settings() 24 | 25 | # The objective function will contain an energy and a regularization term 26 | paramol_settings.properties["include_energies"] = True 27 | paramol_settings.properties["include_forces"] = True 28 | paramol_settings.properties["include_regularization"] = True 29 | # --------------------------------------------------------- # 30 | # Set the QM Engine # 31 | # --------------------------------------------------------- # 32 | # Create the ASE calculator 33 | from ase.calculators.dftb import * 34 | 35 | calc = Dftb(Hamiltonian_='DFTB', # line is included by default 36 | Hamiltonian_MaxSCCIterations=1000, 37 | Hamiltonian_MaxAngularMomentum_='', 38 | Hamiltonian_MaxAngularMomentum_H='s', 39 | Hamiltonian_MaxAngularMomentum_C='p', 40 | Hamiltonian_MaxAngularMomentum_N="p", 41 | Hamiltonian_Dispersion="DftD3 { \n s6=1.000 \n s8=0.5883 \n Damping = BeckeJohnson { \n a1=0.5719 \n a2=3.6017 \n } \n }", 42 | Hamiltonian_SCC='Yes', 43 | Hamiltonian_SCCTolerance=1e-8, ) 44 | 45 | # Alternative, we could set the calculator in the settings 46 | paramol_settings.qm_engine["ase"]["calculator"] = calc 47 | 48 | # --------------------------------------------------------- # 49 | # Perform the HMC Sampling # 50 | # --------------------------------------------------------- # 51 | hmc_sampler = HMCSampler() 52 | 53 | hmc_sampler.run_task(paramol_settings, [aniline], n_sweeps=10000, n_steps_per_sweep=100, 54 | temperature_pot_qm=unit.Quantity(300, unit.kelvin), 55 | temperature_pot_mm=unit.Quantity(300, unit.kelvin), 56 | temperature_kin_mm=unit.Quantity(300, unit.kelvin), 57 | parametrization=True, 58 | parametrization_freq=1000) 59 | 60 | 61 | # Write ParaMol Force Field file with final parameters 62 | aniline.force_field.write_ff_file("aniline_hmc.ff") 63 | 64 | # Write final data 65 | aniline.write_data("aniline_hmc.nc") 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 João Morado 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ParaMol/Force_field/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Force_field subpackage. 4 | 5 | Contains modules related to the ParaMol representation of a force field. 6 | 7 | The param_keys used for each force group in ParaMol are as follows: 8 | 9 | - 'HarmonicBondForce' 10 | - 'bond_eq' : bond equilibrium value 11 | - 'bond_k' : bond force constant 12 | - 'HarmonicAngleForce' 13 | - 'angle_eq' : angle equilibrium value 14 | - 'angle_k' : angle force constant 15 | - 'PeriodicTorsionForce' 16 | - 'torsion_periodicity' : torsion periodicity 17 | - 'torsion_phase' : torsion phase 18 | - 'torsion_k' : torsion barrier height 19 | - 'NonbondedForce' 20 | - 'charge' : Coulomb charge 21 | - 'lj_eps' : Lennard-Jones 12-6 epsilon (depth of the potential well) 22 | - 'lj_sigma' : Lennard-Jones 12-6 sigma (finite distance at which the inter-particle potential is zero) 23 | - 'scee' : 1-4 electrostatic scaling factor 24 | - 'scnb' : 1-4 Lennard-Jones scaling factor 25 | """ 26 | 27 | __all__ = ['force_field', 28 | 'force_field_term', 29 | 'force_field_term_parameter'] -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/force_field.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/force_field.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/force_field.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/force_field.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/force_field_term.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/force_field_term.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/force_field_term.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/force_field_term.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/force_field_term_parameter.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/force_field_term_parameter.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/__pycache__/force_field_term_parameter.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Force_field/__pycache__/force_field_term_parameter.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Force_field/force_field_term.py: -------------------------------------------------------------------------------- 1 | """ 2 | Description 3 | =========== 4 | - The :obj:`ParaMol.Force_field.force_field_term.FFTerm` class is the ParaMol representation of a force field term, e.g. a bond, angle, torsion or Couloumb term. 5 | - A :obj:`ParaMol.Force_field.force_field_term.FFTerm` can contain several parameters. For example, if its force_group is "HarmonicBondForce" it should contain a parameter with key "bond_k" that corresponds to the bond force constant and a parameter with key "bond_eq" that corresponds to the bond equilibrium value. These keys are stored as `param_key` attributes in the correspondent :obj:`ParaMol.Force_field.force_field_term_parameter.Parameter` instance. 6 | """ 7 | 8 | from .force_field_term_parameter import * 9 | 10 | 11 | class FFTerm: 12 | """ 13 | ParaMol representation of a force field term. 14 | 15 | Parameters 16 | ---------- 17 | force_group : str 18 | Name of the force group as given by OpenMM. 19 | idx : int 20 | Index of the force field term within a given force group in OpenMM.. 21 | atoms : list 22 | Atoms involved in the force field term. 23 | symmetry_group : str 24 | Symmetry group of the force field term. 25 | 26 | Attributes 27 | ---------- 28 | force_group : str 29 | Name of the force group as given by OpenMM. 30 | idx : int 31 | Index of the force group. 32 | atoms : list 33 | Atoms involved in the force field term: 34 | symmetry_group : str 35 | Symmetry group of the force field term. 36 | parameters : dict 37 | Dictionary that contains the mapping between `param_key` and :obj:`ParaMol.Force_field.force_field_term_parameter.Parameter`. 38 | """ 39 | def __init__(self, force_group, idx, atoms, symmetry_group="X"): 40 | self.force_group = force_group 41 | self.idx = idx 42 | self.atoms = atoms 43 | self.parameters = {} 44 | self.symmetry_group = symmetry_group 45 | 46 | def __str__(self): 47 | return "Force Field term with id {} belonging to " \ 48 | "force group {}. Contains {} parameters.".format(self.idx, self.force_group, len(self.parameters)) 49 | 50 | def __repr__(self): 51 | return "Force Field term with id {} belonging to " \ 52 | "force group {}. Contains {} parameters.".format(self.idx, self.force_group, len(self.parameters)) 53 | 54 | # ------------------------------------------------------------ # 55 | # # 56 | # PUBLIC METHODS # 57 | # # 58 | # ------------------------------------------------------------ # 59 | def add_parameter(self, symmetry_group, optimize, param_key, value): 60 | """ 61 | Method that adds a :obj:`ParaMol.Force_field.force_field_term_parameter.Parameter` with key `param_key` to the parameters dictionary. 62 | 63 | Parameters 64 | ---------- 65 | symmetry_group : str 66 | Symmetry group of the force field term. 67 | optimize : bool 68 | Flags that signals whether or not this is an optimizable parameters. 69 | param_key : str 70 | Key of the parameter. 71 | value : int/float 72 | Value of the parameter 73 | 74 | Returns 75 | ------- 76 | parameters : dict 77 | Dictionary containing the current mapping between `param_key` and :obj:`ParaMol.Force_field.force_field_term_parameter.Parameter`. 78 | """ 79 | self.parameters[param_key] = Parameter(symmetry_group, optimize, param_key, value, self) 80 | 81 | return self.parameters 82 | -------------------------------------------------------------------------------- /ParaMol/Force_field/force_field_term_parameter.py: -------------------------------------------------------------------------------- 1 | """ 2 | Description 3 | =========== 4 | - The :obj:`ParaMol.Force_field.force_field_term_parameter.Parameter` class is the ParaMol representation of a force field term parameter, e.g., a force constant or an equilibrium value. 5 | - A :obj:`ParaMol.Force_field.force_field_term_parameter.Parameter` instance has `param_key` and `force_group` attributes that define what is the force field term to which this parameter belongs and what is the role of the parameter in the force field term. 6 | - The attribute `optimize` determines whether or not this parameters is optimizable. 7 | - The `symmetry_group` attribute enables to make this parameter equivalent to others in symmetry-constrained optimizations. 8 | """ 9 | 10 | 11 | class Parameter: 12 | """ 13 | ParaMol representation of a force field parameter. 14 | 15 | Parameters 16 | ---------- 17 | symmetry_group : str 18 | Symmetry group of the force field term. 19 | optimize : bool 20 | Flags that signals whether or not this is an optimizable parameters. 21 | param_key : str 22 | Key of the parameter. 23 | value : float/int 24 | Value of the parameter. 25 | ff_term : ParaMol.Force_field.force_field_term.FFTerm 26 | Force field term to which this parameter original belongs 27 | 28 | Attributes 29 | ---------- 30 | symmetry_group : str 31 | Symmetry group of the force field term. 32 | optimize : bool 33 | Flags that signals whether or not this is an optimizable parameters. 34 | param_key : str 35 | Key of the parameter. 36 | value : float/int 37 | Value of the parameter. 38 | multiplicity : 39 | Multiplicity of the parameter, i.e., how many parameters with the same `symmetry_group` exist and `param_key` exist. Only relevant for symmetry-constrained optimizations. 40 | ff_term : ParaMol.Force_field.force_field_term.FFTerm 41 | Force field term to which this parameter original belongs 42 | """ 43 | def __init__(self, symmetry_group, optimize, param_key, value, ff_term=None): 44 | self.symmetry_group = symmetry_group 45 | self.optimize = optimize 46 | self.value = value 47 | self.param_key = param_key 48 | self.multiplicity = 1.0 49 | self.ff_term = ff_term 50 | 51 | def __str__(self): 52 | """ 53 | Defines the print statement to obtain the string representation of a parameter. 54 | 55 | Returns 56 | ------- 57 | 58 | """ 59 | description = "\n" 60 | description += "Parameter key: {} \n".format(self.param_key) 61 | description += "Value: {} \n".format(self.value) 62 | description += "Optimize: {} \n".format(self.optimize) 63 | description += "Symmetry group: {} \n".format(self.symmetry_group) 64 | 65 | return description 66 | 67 | -------------------------------------------------------------------------------- /ParaMol/HMC/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/HMC/__init__.py -------------------------------------------------------------------------------- /ParaMol/HMC/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/HMC/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/HMC/__pycache__/hmc_sampler.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/HMC/__pycache__/hmc_sampler.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/HMC/__pycache__/integrators_adapted.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/HMC/__pycache__/integrators_adapted.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/HMC/integrators_adapted.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module implements an adapted VelocityVerlet integrator that works the Hyrid MC carlo code. 3 | The class implemented here is totally based on the original one, which is part of openmmtools. 4 | Joao Morado 22.05.2019 5 | """ 6 | from openmmtools.integrators import * 7 | 8 | 9 | class VelocityVerletIntegratorAdapted(mm.CustomIntegrator): 10 | """Verlocity Verlet integrator. 11 | 12 | Notes 13 | ----- 14 | This integrator is taken verbatim from Peter Eastman's example appearing in the CustomIntegrator header file documentation. 15 | 16 | References 17 | ---------- 18 | W. C. Swope, H. C. Andersen, P. H. Berens, and K. R. Wilson, J. Chem. Phys. 76, 637 (1982) 19 | 20 | Examples 21 | -------- 22 | 23 | Create a velocity Verlet integrator. 24 | 25 | >>> timestep = 1.0 * unit.femtoseconds 26 | >>> integrator = VelocityVerletIntegrator(timestep) 27 | 28 | """ 29 | 30 | def __init__(self, timestep=1.0 * unit.femtoseconds): 31 | """Construct a velocity Verlet integrator. 32 | 33 | Parameters 34 | ---------- 35 | timestep : np.unit.Quantity compatible with femtoseconds, default: 1*unit.femtoseconds 36 | The integration timestep. 37 | 38 | """ 39 | 40 | super(VelocityVerletIntegratorAdapted, self).__init__(timestep) 41 | 42 | self.addPerDofVariable("x1", 0) 43 | self.addComputePerDof("v", "v+0.5*dt*f/m") 44 | self.addComputePerDof("x", "x+dt*v") 45 | self.addComputePerDof("x1", "x") 46 | self.addConstrainPositions() 47 | self.addComputePerDof("v", "v+0.5*dt*f/m+(x-x1)/dt") 48 | self.addConstrainVelocities() 49 | -------------------------------------------------------------------------------- /ParaMol/MM_engines/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol MM_engines subpackage. 4 | 5 | Contains modules related to the ParaMol representation of MM engines. 6 | """ 7 | 8 | 9 | __all__ = ['openmm', 'resp'] -------------------------------------------------------------------------------- /ParaMol/MM_engines/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/MM_engines/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/MM_engines/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/MM_engines/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/MM_engines/__pycache__/openmm.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/MM_engines/__pycache__/openmm.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/MM_engines/__pycache__/openmm.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/MM_engines/__pycache__/openmm.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/MM_engines/__pycache__/resp.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/MM_engines/__pycache__/resp.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/MM_engines/__pycache__/resp.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/MM_engines/__pycache__/resp.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Objective_function subpackage. 4 | 5 | Contains modules related to the ParaMol representation of the properties of the objective (cost) function. 6 | """ 7 | 8 | __all__ = ['property', 9 | 'energy_property', 10 | 'force_property', 11 | 'regularization'] -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/energy_property.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/energy_property.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/energy_property.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/energy_property.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/esp_property.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/esp_property.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/esp_property.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/esp_property.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/force_property.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/force_property.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/force_property.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/force_property.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/property.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/property.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/property.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/property.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/regularization.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/regularization.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/__pycache__/regularization.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/Properties/__pycache__/regularization.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/Properties/property.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Description 4 | ----------- 5 | 6 | This module defines the :obj:`ParaMol.Objective_function.Properties.property.Property` class, which is the Property base class. 7 | """ 8 | 9 | 10 | class Property: 11 | def __init__(self): 12 | self.name = None 13 | self.value = None 14 | self.weight = None 15 | 16 | # ------------------------------------------------------------------------------------------------------- # 17 | # Data Weighting Methods # 18 | # ------------------------------------------------------------------------------------------------------- # 19 | def calculate_variance(self): 20 | pass 21 | 22 | """ 23 | TODO: deprecated method 24 | def compute_property_weights(self): 25 | ''' 26 | Compute the weights to be attributed to the data points of a given property. 27 | 28 | :return: array containing the weight of each data point. 29 | :rtype: np.ndarray 30 | ''' 31 | assert self._force_matching.fqm_residual is not None, "No quantum corrected forces were set yet." 32 | 33 | self._w_property = np.zeros(self._force_matching.fqm_residual.shape) 34 | for i in range(self._force_matching.n_atoms): 35 | for j in range(3): 36 | hist, bin_edges = np.histogram(self._force_matching.fqm_residual[:, i, j], bins=100, density=False) 37 | 38 | f = [] 39 | for force in self._force_matching.fqm_residual[:, i, j]: 40 | for k in range(1,len(bin_edges)): 41 | if bin_edges[k] >= force >= bin_edges[k-1]: 42 | f.append(hist[k-1]) 43 | 44 | self._w_property[:, i, j] = f 45 | 46 | self._w_property = 1.0 / self._w_property 47 | 48 | return self._w_property 49 | """ -------------------------------------------------------------------------------- /ParaMol/Objective_function/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Objective_function subpackage. 4 | 5 | Contains modules related to the ParaMol representation of the objective (cost) function. 6 | """ 7 | 8 | __all__ = ['cpu_objective_function', 9 | 'gpu_objective_function', 10 | 'objective_function', 11 | 'Properties'] 12 | -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/cpu_objective_function.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/cpu_objective_function.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/cpu_objective_function.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/cpu_objective_function.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/gpu_objective_function.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/gpu_objective_function.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/gpu_objective_function.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/gpu_objective_function.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/objective_function.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/objective_function.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/objective_function.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/objective_function.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/pickable_swig.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/pickable_swig.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/__pycache__/pickable_swig.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Objective_function/__pycache__/pickable_swig.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Objective_function/gpu_objective_function.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Description 4 | ----------- 5 | 6 | This module defines the :obj:`ParaMol.Objective_function.cpu_objective_function.GPUObjectiveFunction` class used by ParaMol to perform parallel evaluation of the objective function using CPUs. 7 | """ 8 | import multiprocessing as mp 9 | import numpy as np 10 | from simtk.openmm import * 11 | 12 | # Shared memory variables 13 | shared_dict = {} 14 | 15 | 16 | class GPUObjectiveFunction: 17 | """ 18 | ParaMol's wrapper for the GPU parallel callback function. 19 | 20 | Attributes 21 | ---------- 22 | X : list 23 | List containing conformations data. 24 | calculate_energies : bool 25 | Flag that controls whether or not the energies will be calculated. 26 | calculate_energies : bool 27 | Flag that controls whether or not the forces will be calculated. 28 | n_atoms : int 29 | Number of atoms of the system- 30 | 31 | Notes 32 | ------ 33 | Only usable with OpenMM's 'OpenCL' platform. 34 | """ 35 | def __init__(self): 36 | self.X = None 37 | self.batch_lims = None 38 | self.n_atoms = None 39 | self.calculate_energies = None 40 | self.calculate_forces = None 41 | self._lock = None 42 | 43 | # ------------------------------------------------------------ # 44 | # # 45 | # PUBLIC METHODS # 46 | # # 47 | # ------------------------------------------------------------ # 48 | @staticmethod 49 | def init_worker(): 50 | pass 51 | 52 | def f_callback_function(self, system, integrator, system_id, worker_id): 53 | """ 54 | Method that may be used as a callback function for the parallel computation of the objective function using GPUs. 55 | 56 | Parameters 57 | ---------- 58 | system: :obj:`ParaMol.Objective_function.pickable_swig.PickalableContext` 59 | OpenMM system. 60 | integrator : any OpenMM integrator object 61 | OpenMM integrator. 62 | system_id : int 63 | Index of the OpenMM system copy. 64 | worker_id : int 65 | Index of the parallel worker. 66 | 67 | Notes 68 | ------ 69 | Unfortunately, for GPUs, context has to be created here, which slows down the computation as it is a costly operation. 70 | Only 'OpenCL' was tested. 'CUDA' platform hasn't been tested yet. 71 | 72 | Returns 73 | ------- 74 | emm_data, fmm_data: np.array(batch_size), np.array(batch_size, n_atoms, 3) 75 | Arrays containing MM energies and forces. 76 | """ 77 | # Create context 78 | platform = Platform.getPlatformByName('OpenCL') 79 | platform.setPropertyDefaultValue('DeviceIndex', '%d' % worker_id) # select OpenCL device index 80 | context = Context(system, copy.deepcopy(integrator), platform) 81 | 82 | conformations = self.X[system_id][self.batch_lims[system_id][worker_id][0]:self.batch_lims[system_id][worker_id][1], :, :] 83 | batch_size = conformations.shape[0] 84 | fmm_data = np.zeros((batch_size, self.n_atoms[system_id], 3)) 85 | emm_data = np.zeros((batch_size)) 86 | 87 | # Perform necessary computation (energies and forces, only forces or only energies) 88 | if self.calculate_energies[system_id] and self.calculate_forces[system_id]: 89 | for i in range(batch_size): 90 | context.setPositions(conformations[i]) 91 | state = context.getState(getEnergy=True, getForces=True) 92 | emm_data[i] = state.getPotentialEnergy()._value 93 | fmm_data[i, :, :] = state.getForces(asNumpy=True)._value 94 | elif self.calculate_forces[system_id]: 95 | for i in range(batch_size): 96 | context.setPositions(conformations[i]) 97 | state = context.getState(getForces=True) 98 | fmm_data[i, :, :] = state.getForces(asNumpy=True)._value 99 | elif self.calculate_energies[system_id]: 100 | for i in range(batch_size): 101 | context.setPositions(conformations[i]) 102 | state = context.getState(getEnergy=True) 103 | emm_data[i] = state.getPotentialEnergy()._value 104 | 105 | del platform, context 106 | 107 | return emm_data, fmm_data 108 | 109 | -------------------------------------------------------------------------------- /ParaMol/Objective_function/pickable_swig.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | Description 5 | ----------- 6 | 7 | This module defines the auxiliary classes used to make an OpenMM context pickalable. 8 | """ 9 | 10 | from simtk.openmm import * 11 | 12 | 13 | class PickalableSWIG(object): 14 | """ 15 | Defines the __setstate__ and __getstate__ methods necessary to convert an object instance into a Pickle. 16 | """ 17 | def __setstate__(self, state): 18 | self.__init__(*state['args']) 19 | 20 | def __getstate__(self): 21 | return {'args': self.args} 22 | 23 | 24 | class PickalableContext(Context, PickalableSWIG): 25 | """ 26 | Wrapper around the Context OpenMM class. 27 | This is necessary to make an OpenMM context pickalable, i.e., serializable. 28 | 29 | Notes 30 | ----- 31 | For more information see: https://stackoverflow.com/questions/9310053/how-to-make-my-swig-extension-module-work-with-pickle 32 | """ 33 | def __init__(self, *args): 34 | self.args = args 35 | Context.__init__(self, *args) 36 | 37 | 38 | -------------------------------------------------------------------------------- /ParaMol/Optimizers/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Optimizers subpackage. 4 | 5 | Contains modules related to the ParaMol representation of optimizers that minimize the objective function. 6 | """ 7 | 8 | 9 | __all__ = ['optimizer', 10 | 'scipy_optimizers', 11 | 'monte_carlo', 12 | 'gradient_descent', 13 | 'simulated_annealing'] 14 | 15 | -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/gradient_descent.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/gradient_descent.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/gradient_descent.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/gradient_descent.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/monte_carlo.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/monte_carlo.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/monte_carlo.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/monte_carlo.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/optimizer.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/optimizer.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/optimizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/optimizer.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/scipy_optimizers.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/scipy_optimizers.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/scipy_optimizers.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/scipy_optimizers.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/simulated_annealing.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/simulated_annealing.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/__pycache__/simulated_annealing.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/__pycache__/simulated_annealing.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Optimizers/devel/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Optimizers/devel/__init__.py -------------------------------------------------------------------------------- /ParaMol/Optimizers/scipy_optimizers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Description 4 | ----------- 5 | 6 | This module defines the :obj:`ParaMol.Optimizers.scipy_optimizers.ScipyOptimizer` class, which is the ParaMol wrapper of the SciPy optimizers. 7 | """ 8 | 9 | 10 | class ScipyOptimizer: 11 | """ 12 | ParaMol wrapper of the SciPy optimizers. 13 | 14 | Notes 15 | ------ 16 | This class is mainly a wrapper around the minimize SciPy function. 17 | For more information see https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html. 18 | Tested optimizers: 19 | scipy_constrained_methods = ['trust-constr', 'SLSQP', 'COBYLA'] 20 | scipy_unconstrained_methods = ['Powell', 'BFGS', 'Nelder-Mead'] 21 | 22 | Parameters 23 | ---------- 24 | **minimizer_params : dict 25 | Keyword arguments passed to scipy.optimize.minimize function (except the objective function callable, method name and x0, i.e., the parameter's array). 26 | 27 | Attributes 28 | ---------- 29 | **minimizer_params : dict 30 | Keyword arguments passed to scipy.optimize.minimize function (except the objective function callable, method name and x0, i.e., the parameter's array). 31 | """ 32 | 33 | def __init__(self, **minimizer_params): 34 | self.__dict__.update(**minimizer_params) 35 | 36 | # ------------------------------------------------------------ # 37 | # # 38 | # PUBLIC METHODS # 39 | # # 40 | # ------------------------------------------------------------ # 41 | def run_optimization(self, f, parameters, constraints=None): 42 | """ 43 | Method that runs a SciPy optimization. 44 | 45 | Parameters 46 | ---------- 47 | f: callable 48 | Reference to the objective function. 49 | parameters: list 50 | 1D list with the adimensional mathematical parameters that will be used in the optimization. 51 | constraints: list of constraints. 52 | Constraints to apply. 53 | 54 | Returns 55 | ------- 56 | parameters: list 57 | 1D list with the updated adimensional mathematical parameters. 58 | """ 59 | from scipy.optimize import minimize 60 | 61 | print("!=================================================================================!") 62 | print("! STARTING SCIPY OPTIMIZER !") 63 | print("!=================================================================================!") 64 | 65 | if constraints is None: 66 | # Perform unconstrained optimization 67 | optimization = minimize(fun=f, x0=parameters, **self.__dict__) 68 | else: 69 | # Perform constrained optimization 70 | optimization = minimize(fun=f, x0=parameters, constraints=constraints, **self.__dict__) 71 | 72 | print("!=================================================================================!") 73 | print("! SCIPY OPTIMIZER TERMINATED SUCCESSFULLY! :) !") 74 | print("!=================================================================================!") 75 | return optimization.x 76 | 77 | 78 | -------------------------------------------------------------------------------- /ParaMol/Parameter_space/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Parameter_space subpackage. 4 | 5 | Contains modules related to the ParaMol representation of the parameter space. 6 | """ 7 | 8 | 9 | __all__ = ['parameter_space'] -------------------------------------------------------------------------------- /ParaMol/Parameter_space/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Parameter_space/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Parameter_space/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Parameter_space/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Parameter_space/__pycache__/parameter_space.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Parameter_space/__pycache__/parameter_space.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Parameter_space/__pycache__/parameter_space.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Parameter_space/__pycache__/parameter_space.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Parameter_space subpackage. 4 | 5 | Contains modules related to the ParaMol representation of QM engines. 6 | """ 7 | 8 | __all__ = ['amber_wrapper', 9 | 'dftb_wrapper', 10 | 'ase_wrapper', 11 | 'qm_engine'] 12 | 13 | 14 | -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/amber_wrapper.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/amber_wrapper.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/amber_wrapper.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/amber_wrapper.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/ase_wrapper.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/ase_wrapper.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/ase_wrapper.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/ase_wrapper.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/dftb_wrapper.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/dftb_wrapper.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/dftb_wrapper.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/dftb_wrapper.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/qm_engine.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/qm_engine.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/QM_engines/__pycache__/qm_engine.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/QM_engines/__pycache__/qm_engine.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/System/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol System subpackage. 4 | 5 | Contains modules related to the ParaMol representation of a chemical system. 6 | """ 7 | 8 | __all__ = ['system'] -------------------------------------------------------------------------------- /ParaMol/System/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/System/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /ParaMol/System/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/System/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/System/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/System/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/System/__pycache__/system.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/System/__pycache__/system.cpython-35.pyc -------------------------------------------------------------------------------- /ParaMol/System/__pycache__/system.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/System/__pycache__/system.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/System/__pycache__/system.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/System/__pycache__/system.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | ParaMol Tasks subpackage. 5 | 6 | This subpackage contains modules that automate the following tasks: 7 | 8 | - Parametriztion (:obj:`ParaMol.Tasks.parametrization.Parametrization`). 9 | - Adaptive Parametrization (:obj:`ParaMol.Tasks.adaptive_parametrization.AdaptiveParametrization`) 10 | - Torsions Parametrization (:obj:`ParaMol.Tasks.torsions_parametrization`) 11 | - Torsion Scan (:obj:`ParaMol.Tasks.torsions_scan`) 12 | - RESP Fitting (:obj:`ParaMol.Tasks.resp_fitting`) 13 | - Ab initio Properties (:obj:`ParaMol.Tasks.ab_initio_properties`) 14 | - Objective Function Plot (:obj:`ParaMol.Tasks.objective_function_plot`) 15 | """ 16 | 17 | __all__ = ['task', 18 | 'parametrization', 19 | 'adaptive_parametrization', 20 | 'torsions_parametrization', 21 | 'torsions_scan', 22 | 'resp_fitting', 23 | 'ab_initio_properties', 24 | 'objective_function_plot'] -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/ab_initio_properties.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/ab_initio_properties.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/ab_initio_properties.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/ab_initio_properties.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/adaptive_parametrization.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/adaptive_parametrization.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/adaptive_parametrization.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/adaptive_parametrization.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/objective_function_plot.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/objective_function_plot.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/objective_function_plot.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/objective_function_plot.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/parametrization.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/parametrization.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/parametrization.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/parametrization.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/resp_fitting.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/resp_fitting.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/resp_fitting.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/resp_fitting.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/task.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/task.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/task.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/task.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/torsions_parametrization.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/torsions_parametrization.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/torsions_parametrization.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/torsions_parametrization.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/torsions_scan.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/torsions_scan.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/__pycache__/torsions_scan.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/__pycache__/torsions_scan.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/forces_parallel/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol module with auxiliary functions to perform parallel computation of ab initio properties. 4 | """ 5 | import numpy as np 6 | 7 | 8 | # -----------------------------------------------------------# 9 | # # 10 | # PARALLEL CALLBACK FUNCTION # 11 | # # 12 | # -----------------------------------------------------------# 13 | def qm_parallel(conformations, qm_wrapper, label): 14 | """ 15 | Method that can be used as a callback function for the parallel computation of QM forces and energies. 16 | 17 | Parameters 18 | ---------- 19 | conformations : np.array 20 | Array with conformations 21 | qm_wrapper : any ParaMol QM_engine 22 | Instance of QM wrapper 23 | label : str 24 | Label of the 25 | 26 | Returns 27 | ------- 28 | 29 | """ 30 | """ 31 | 32 | Args: 33 | conformations 34 | qm_wrapper (QMEngine): 35 | label (str): Label of the calculation. 36 | 37 | Returns: 38 | fqm, eqm 39 | """ 40 | 41 | # proc = mp.current_process() 42 | n_conformations = len(conformations) 43 | fqm = np.zeros((n_conformations, qm_wrapper._n_atoms, 3)) 44 | eqm = np.zeros(n_conformations) 45 | 46 | # Iterate over all conformations and calculate energies and forces, 47 | for i in range(n_conformations): 48 | energy, forces = qm_wrapper.run_calculation(coords=conformations[i] * 10.0, label=label) 49 | eqm[i] = energy 50 | fqm[i] = forces 51 | 52 | return fqm, eqm 53 | -------------------------------------------------------------------------------- /ParaMol/Tasks/forces_parallel/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/forces_parallel/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Tasks/forces_parallel/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tasks/forces_parallel/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/External/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['test_rdkit'] -------------------------------------------------------------------------------- /ParaMol/Tests/External/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/External/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/External/__pycache__/test_rdkit.cpython-37-pytest-5.3.5.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/External/__pycache__/test_rdkit.cpython-37-pytest-5.3.5.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/External/__pycache__/test_rdkit.cpython-37-pytest-6.0.1.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/External/__pycache__/test_rdkit.cpython-37-pytest-6.0.1.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/External/test_rdkit.py: -------------------------------------------------------------------------------- 1 | # Import ParaMol modules 2 | from ParaMol.System.system import * 3 | from ParaMol.Tasks.torsions_scan import * 4 | from ParaMol.Tasks.torsions_parametrization import * 5 | 6 | import rdkit 7 | import numpy as np 8 | 9 | 10 | class TestSystem: 11 | # Kwargs dictionary for AMBER topology system. These are shared between all instances. 12 | kwargs_dict = {"topology_format": "AMBER", 13 | "crd_format": "AMBER", 14 | "top_file": "ParaMol/Tests/aniline.prmtop", 15 | "crd_file": "ParaMol/Tests/aniline.inpcrd"} 16 | 17 | def test_get_rdkit_mol_conf(self): 18 | """ 19 | Test get_rdkit_mol_conf 20 | """ 21 | openmm_engine = OpenMMEngine(True, **self.kwargs_dict) 22 | 23 | assert type(openmm_engine) is OpenMMEngine 24 | 25 | system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) 26 | 27 | torsion_scan = TorsionScan() 28 | mol, conf = torsion_scan.get_rdkit_mol_conf(system) 29 | 30 | assert type(mol) is rdkit.Chem.rdchem.Mol 31 | assert type(conf) is rdkit.Chem.rdchem.Conformer 32 | 33 | def test_get_rotatable_bonds(self): 34 | """ 35 | Test get rotatable bonds method. 36 | """ 37 | openmm_engine = OpenMMEngine(True, **self.kwargs_dict) 38 | 39 | assert type(openmm_engine) is OpenMMEngine 40 | 41 | system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) 42 | 43 | torsion_scan = TorsionScan() 44 | 45 | assert type(torsion_scan) is TorsionScan 46 | 47 | mol, conf = torsion_scan.get_rdkit_mol_conf(system) 48 | 49 | assert type(mol) is rdkit.Chem.rdchem.Mol 50 | assert type(conf) is rdkit.Chem.rdchem.Conformer 51 | 52 | torsion_param = TorsionsParametrization() 53 | 54 | rot_bonds = torsion_param.get_rotatable_bonds(mol) 55 | 56 | assert rot_bonds == ((6, 7),) 57 | assert len(rot_bonds) == 1 58 | 59 | def test_get_rotatable_torsions(self): 60 | """ 61 | Test get rotatable torsions. 62 | """ 63 | openmm_engine = OpenMMEngine(True, **self.kwargs_dict) 64 | 65 | assert type(openmm_engine) is OpenMMEngine 66 | 67 | system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) 68 | 69 | system.force_field.create_force_field() 70 | system.force_field.create_force_field_optimizable() 71 | 72 | torsion_scan = TorsionScan() 73 | 74 | assert type(torsion_scan) is TorsionScan 75 | 76 | mol, conf = torsion_scan.get_rdkit_mol_conf(system) 77 | 78 | assert type(mol) is rdkit.Chem.rdchem.Mol 79 | assert type(conf) is rdkit.Chem.rdchem.Conformer 80 | 81 | torsion_param = TorsionsParametrization() 82 | 83 | rot_bonds = torsion_param.get_rotatable_bonds(mol) 84 | 85 | assert rot_bonds == ((6, 7),) 86 | assert len(rot_bonds) == 1 87 | 88 | rot_dihedrals = torsion_param.get_rotatable_torsions(system, rot_bonds) 89 | 90 | assert len(rot_dihedrals) == 1 91 | 92 | def test_dihedral_rotation(self): 93 | """ 94 | Test get rotatable torsions. 95 | """ 96 | openmm_engine = OpenMMEngine(True, **self.kwargs_dict) 97 | 98 | assert type(openmm_engine) is OpenMMEngine 99 | 100 | system = ParaMolSystem(name="aniline", engine=openmm_engine, n_atoms=14) 101 | 102 | system.force_field.create_force_field() 103 | system.force_field.create_force_field_optimizable() 104 | 105 | torsion_scan = TorsionScan() 106 | 107 | assert type(torsion_scan) is TorsionScan 108 | 109 | mol, conf = torsion_scan.get_rdkit_mol_conf(system) 110 | 111 | assert type(mol) is rdkit.Chem.rdchem.Mol 112 | assert type(conf) is rdkit.Chem.rdchem.Conformer 113 | 114 | torsion_param = TorsionsParametrization() 115 | 116 | rot_bonds = torsion_param.get_rotatable_bonds(mol) 117 | 118 | assert rot_bonds == ((6, 7),) 119 | assert len(rot_bonds) == 1 120 | 121 | rot_dihedrals = torsion_param.get_rotatable_torsions(system, rot_bonds) 122 | 123 | assert len(rot_dihedrals) == 1 124 | -------------------------------------------------------------------------------- /ParaMol/Tests/Force_field/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['test_force_field'] -------------------------------------------------------------------------------- /ParaMol/Tests/Force_field/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Force_field/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Force_field/__pycache__/test_force_field.cpython-37-pytest-5.3.5.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Force_field/__pycache__/test_force_field.cpython-37-pytest-5.3.5.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Force_field/__pycache__/test_force_field.cpython-37-pytest-6.0.1.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Force_field/__pycache__/test_force_field.cpython-37-pytest-6.0.1.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/MM_engines/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['test_openmm_wrapper'] -------------------------------------------------------------------------------- /ParaMol/Tests/MM_engines/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/MM_engines/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/MM_engines/__pycache__/test_openmm_wrapper.cpython-37-pytest-5.3.5.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/MM_engines/__pycache__/test_openmm_wrapper.cpython-37-pytest-5.3.5.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/MM_engines/__pycache__/test_openmm_wrapper.cpython-37-pytest-6.0.1.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/MM_engines/__pycache__/test_openmm_wrapper.cpython-37-pytest-6.0.1.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Objective_function/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['test_objective_function'] -------------------------------------------------------------------------------- /ParaMol/Tests/Objective_function/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Objective_function/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Objective_function/__pycache__/test_objective_function.cpython-37-pytest-5.3.5.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Objective_function/__pycache__/test_objective_function.cpython-37-pytest-5.3.5.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Objective_function/__pycache__/test_objective_function.cpython-37-pytest-6.0.1.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Objective_function/__pycache__/test_objective_function.cpython-37-pytest-6.0.1.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Parameter_space/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['test_parameter_space'] -------------------------------------------------------------------------------- /ParaMol/Tests/Parameter_space/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Parameter_space/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Parameter_space/__pycache__/test_parameter_space.cpython-37-pytest-5.3.5.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Parameter_space/__pycache__/test_parameter_space.cpython-37-pytest-5.3.5.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Parameter_space/__pycache__/test_parameter_space.cpython-37-pytest-6.0.1.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Parameter_space/__pycache__/test_parameter_space.cpython-37-pytest-6.0.1.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/System/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['test_system'] -------------------------------------------------------------------------------- /ParaMol/Tests/System/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/System/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/System/__pycache__/test_system.cpython-37-pytest-5.3.5.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/System/__pycache__/test_system.cpython-37-pytest-5.3.5.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/System/__pycache__/test_system.cpython-37-pytest-6.0.1.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/System/__pycache__/test_system.cpython-37-pytest-6.0.1.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Tasks/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['test_resp'] -------------------------------------------------------------------------------- /ParaMol/Tests/Tasks/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Tasks/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Tasks/__pycache__/test_resp.cpython-37-pytest-5.3.5.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Tasks/__pycache__/test_resp.cpython-37-pytest-5.3.5.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/Tasks/__pycache__/test_resp.cpython-37-pytest-6.0.1.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/Tasks/__pycache__/test_resp.cpython-37-pytest-6.0.1.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Tests subpackage. 4 | 5 | """ 6 | 7 | __all__ = ['External', 'Force_field', 'MM_engines', 'Objective_function', 'Parameter_space', 'System', 'Tasks'] -------------------------------------------------------------------------------- /ParaMol/Tests/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Tests/aniline.inpcrd: -------------------------------------------------------------------------------- 1 | X 2 | 14 3 | 18.5340000 17.1030000 22.5930000 18.7780000 17.6670000 21.6840000 4 | 17.8760000 17.7060000 20.6170000 16.9190000 17.1710000 20.6900000 5 | 18.1790000 18.4180000 19.4580000 17.4720000 18.4470000 18.6190000 6 | 19.4060000 19.1030000 19.3590000 19.6990000 19.8440000 18.2260000 7 | 19.1580000 19.6450000 17.3800000 20.6760000 20.1080000 18.0740000 8 | 20.3130000 19.0690000 20.4360000 21.2670000 19.6060000 20.3600000 9 | 19.9940000 18.3510000 21.5870000 20.7050000 18.3230000 22.4230000 10 | -------------------------------------------------------------------------------- /ParaMol/Tests/aniline_10_struct.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Tests/aniline_10_struct.nc -------------------------------------------------------------------------------- /ParaMol/Utils/Symmetrizers/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Symmetrizers subsubpackage. 4 | 5 | Contains modules related to the ParaMol symmetrizers, etc... 6 | """ 7 | 8 | __all__ = ['symmetrizer', 9 | 'amber_symmetrizer', 10 | 'gromacs_symmetrizer',] -------------------------------------------------------------------------------- /ParaMol/Utils/Symmetrizers/amber_symmetrizer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Description 4 | ----------- 5 | This module defines the :obj:`ParaMol.Utils.Symmetrizers.amber_symmetrizer.AmberSymmetrizer` used to handle AMBER atom types. 6 | """ 7 | import parmed as pmd 8 | import numpy as np 9 | 10 | # ParaMol modules 11 | from .symmetrizer import * 12 | 13 | 14 | class AmberSymmetrizer(Symmetrizer): 15 | """ 16 | ParaMol class that implements methods to symmetrize the ParaMol Force Field so that it respects AMBER atom-types. 17 | 18 | Parameters 19 | ---------- 20 | top_file : str 21 | AMBER prmtop file 22 | xyz : str or array, optional 23 | If provided, the coordinates and unit cell dimensions from the provided Amber inpcrd/restart file will be loaded into the molecule, or the coordinates will be loaded from the coordinate array 24 | """ 25 | def __init__(self, top_file, xyz=None): 26 | self._amber_top = pmd.amber.AmberParm(top_file, xyz=xyz) 27 | super(AmberSymmetrizer, self).__init__(self._amber_top) 28 | 29 | def __str__(self): 30 | return "AmberSymmetrizer module. AMBER .prmtop file in use is {}".format(self._amber_top) 31 | 32 | def save_frcmod(self, output_file): 33 | """ 34 | Method that saves the .frcmod AMBER file with the current force field parameters of the self._amber_prmtop instance. 35 | 36 | Notes 37 | ----- 38 | In order to update the self._amber_prmtop instance with the optimal parameters, the method update_term_types_parameters should be run before this one. 39 | 40 | Parameters 41 | ---------- 42 | output_file : str 43 | Name of the output file 44 | 45 | Returns 46 | ------- 47 | None 48 | """ 49 | frcmod = pmd.tools.writeFrcmod(self._amber_top, output_file) 50 | 51 | return frcmod.execute() 52 | -------------------------------------------------------------------------------- /ParaMol/Utils/Symmetrizers/charmm_symmetrizer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Description 4 | ----------- 5 | This module defines the :obj:`ParaMol.Utils.Symmetrizers.charmm_symmetrizer.CharmmSymmetrizer` used to handle CHARMM files.. 6 | """ 7 | import parmed as pmd 8 | 9 | # ParaMol modules 10 | from .symmetrizer import * 11 | 12 | 13 | class CharmmSymmetrizer(Symmetrizer): 14 | """ 15 | ParaMol class that implements methods to symmetrize the ParaMol Force Field so that it respects CHARMM atom-types. 16 | 17 | Parameters 18 | ---------- 19 | top_file : str 20 | AMBER prmtop file 21 | xyz : str or array, optional 22 | If provided, the coordinates and unit cell dimensions from the provided CHARMM .CRD file will be loaded into the molecule, or the coordinates will be loaded from the coordinate array 23 | """ 24 | def __init__(self, prm_file, psf_file, xyz=None): 25 | self._charmm_prm = pmd.charmm.CharmmParameterSet(prm_file) 26 | self._charmm_prm.condense(do_dihedrals=True) 27 | self._charmm_psf = pmd.charmm.psf.CharmmPsfFile(psf_file) 28 | # Copy parameters has to be false so that parameters are shared 29 | self._charmm_psf.load_parameters(self._charmm_prm, copy_parameters=False) 30 | super(CharmmSymmetrizer, self).__init__(self._charmm_psf) 31 | 32 | def __str__(self): 33 | return "CharmmSymmetrizer module. CHARMM file in use is {}".format(self._charmm_top) 34 | 35 | def save_parameter_set(self, output_file): 36 | """ 37 | Method that saves the CHARMM parameter file with the current force field parameters of the self._charmm_prm instance 38 | 39 | Notes 40 | ----- 41 | In order to update the self._charmm_prm instance with the optimal parameters, the method update_term_types_parameters should be run before this one. 42 | 43 | Parameters 44 | ---------- 45 | output_file : str 46 | Name of the output file 47 | 48 | Returns 49 | ------- 50 | None 51 | """ 52 | return self._charmm_prm.write(str=output_file) -------------------------------------------------------------------------------- /ParaMol/Utils/Symmetrizers/gromacs_symmetrizer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Description 4 | ----------- 5 | This module defines the :obj:`ParaMol.Utils.Symmetrizers.gromacs_symmetrizer.GromacsSymmetrizer` used to handle GROMACS files. 6 | """ 7 | import parmed as pmd 8 | import numpy as np 9 | 10 | # ParaMol modules 11 | from .symmetrizer import * 12 | 13 | 14 | class GromacsSymmetrizer(Symmetrizer): 15 | """ 16 | ParaMol class that implements methods to symmetrize the ParaMol Force Field so that it respects GROMACS atom-types. 17 | 18 | Parameters 19 | ---------- 20 | top_file : str 21 | GROMACS prmtop file 22 | xyz : str or array, optional 23 | If provided, the coordinates and unit cell dimensions from the provided GROMACS crd file will be loaded into the molecule, or the coordinates will be loaded from the coordinate array. 24 | """ 25 | def __init__(self, top_file, xyz=None): 26 | self._gromacs_top = pmd.gromacs.GromacsTopologyFile(top_file, xyz=xyz) 27 | super(GromacsSymmetrizer, self).__init__(self._gromacs_top) 28 | 29 | def __str__(self): 30 | return "GromacsSymmetrizer module. GROMACS file in use is {}".format(self._gromacs_top) 31 | 32 | -------------------------------------------------------------------------------- /ParaMol/Utils/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol Utils subpackage. 4 | 5 | Contains modules related to the ParaMol settings, symmetrizers, etc... 6 | """ 7 | 8 | __all__ = ['settings', 9 | 'amber_symmetrizer', 10 | 'interface', 11 | 'gaussian_esp', 12 | 'conformational_sampling' 13 | 'Symmetrizers'] -------------------------------------------------------------------------------- /ParaMol/Utils/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__init__.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/amber_symmetrizer.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/amber_symmetrizer.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/amber_symmetrizer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/amber_symmetrizer.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/conformational_sampling.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/conformational_sampling.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/conformational_sampling.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/conformational_sampling.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/gaussian_esp.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/gaussian_esp.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/gaussian_esp.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/gaussian_esp.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/interface.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/interface.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/interface.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/interface.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/settings.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/settings.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /ParaMol/Utils/conformational_sampling.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import simtk.unit as unit 3 | import logging 4 | 5 | from ..Utils.interface import * 6 | 7 | 8 | def conformational_sampling(settings, systems, n_conf, steps_integrator, interface=None): 9 | """ 10 | Function that performs conformational sampling on a given ParaMol system and calculated the ab initio properties (energies and forces). 11 | 12 | Notes 13 | ----- 14 | As currently implemented, previous reference data is erased in the ParaMol system. 15 | 16 | Parameters 17 | ---------- 18 | settings : dict 19 | Dictionary containing global ParaMol settings. 20 | systems : list of :obj:`ParaMol.System.system.ParaMolSystem` 21 | List containing instances of ParaMol systems. 22 | n_conf : int 23 | How many structure to sample in in total. 24 | steps_integrator : int 25 | Number of steps the integrator performs each time it is called. 26 | 27 | Returns 28 | ------- 29 | systems : list of :obj:`ParaMol.System.system.ParaMolSystem` 30 | List containing instances of ParaMol systems (updated). 31 | """ 32 | for system in systems: 33 | # Create QM Engines 34 | if system.interface is None: 35 | system.interface = ParaMolInterface() 36 | 37 | system.create_qm_engines(settings.qm_engine["qm_engine"], settings.qm_engine[settings.qm_engine["qm_engine"].lower()]) 38 | 39 | system.ref_coordinates = [] 40 | system.ref_energies = [] 41 | system.ref_forces = [] 42 | system.n_structures = 0 43 | 44 | logging.info("Performing conformational sampling of {} conformations of system {}.".format(n_conf, system.name)) 45 | 46 | for i in range(n_conf): 47 | system.engine.context.setVelocitiesToTemperature(system.engine.integrator.getTemperature()) 48 | 49 | # Perform classical MD 50 | system.engine.integrator.step(steps_integrator) 51 | 52 | # Get positions and compute QM energy and forces 53 | coord = system.engine.context.getState(getPositions=True).getPositions() 54 | energy, forces = system.qm_engine.qm_engine.run_calculation(coords=coord.in_units_of(unit.angstrom)._value, label=0) 55 | 56 | # Append energies, forces and conformations 57 | system.ref_energies.append(energy) 58 | system.ref_forces.append(np.asarray(forces)) 59 | system.ref_coordinates.append(np.asarray(coord._value)) 60 | system.n_structures += 1 61 | 62 | system.ref_forces = np.asarray(system.ref_forces) 63 | system.ref_energies = np.asarray(system.ref_energies) 64 | system.ref_coordinates = np.asarray(system.ref_coordinates) 65 | 66 | logging.info("Conformational sampling of all systems performed successfully.") 67 | 68 | return systems 69 | 70 | -------------------------------------------------------------------------------- /ParaMol/Utils/geometry.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | 4 | def calculate_distance(p0, p1): 5 | """ 6 | Method that calculates the distance between two points. 7 | 8 | Parameters 9 | ---------- 10 | p0 : list of np.array 11 | Point 0 coordinates. 12 | p1 : list of np.array 13 | Point 1 coordinates. 14 | 15 | Returns 16 | ------- 17 | norm : float 18 | Distance. 19 | """ 20 | 21 | return np.linalg.norm(p1-p0) 22 | 23 | 24 | def unit_vector(v): 25 | """ 26 | Method that returns the unit vector of the vector. 27 | 28 | Parameters 29 | ---------- 30 | v : list of np.array 31 | Vector to normalize. 32 | 33 | 34 | Returns 35 | ------- 36 | unit_vector : np.array 37 | Unit vector 38 | """ 39 | 40 | return v / np.linalg.norm(v) 41 | 42 | 43 | def calculate_angle(v1, v2): 44 | """ 45 | Method that returns the angle in radians between vectors 'v1' and 'v2'. 46 | 47 | Parameters 48 | ---------- 49 | v1 : list of np.array 50 | Vector 1. 51 | v2 : list of np.array 52 | Vector 2. 53 | 54 | Returns 55 | ------- 56 | angle_rad : float 57 | The angle in radians between vectors 'v1' and 'v2'. 58 | """ 59 | 60 | v1_u = unit_vector(v1) 61 | v2_u = unit_vector(v2) 62 | 63 | return np.arccos(np.clip(np.dot(v1_u, v2_u), -1.0, 1.0)) 64 | 65 | 66 | def calculate_dihedral(p0, p1, p2, p3): 67 | """ 68 | Method that returns the dihedral angle formed by 4 points using the praxeolitic formula. 69 | 70 | Parameters 71 | ---------- 72 | p0 : list of np.array 73 | Point 0 coordinates. 74 | p1 : list of np.array 75 | Point 1 coordinates. 76 | p2 : list of np.array 77 | Point 2 coordinates. 78 | p3 : list of np.array 79 | Point 3 coordinates. 80 | 81 | Returns 82 | ------- 83 | angle_rad : float 84 | The dihedral angle in radians. 85 | """ 86 | 87 | b0 = -1.0*(p1 - p0) 88 | b1 = p2 - p1 89 | b2 = p3 - p2 90 | 91 | # normalize b1 so that it does not influence magnitude of vector 92 | # rejections that come next 93 | b1 /= np.linalg.norm(b1) 94 | 95 | # vector rejections 96 | # v = projection of b0 onto plane perpendicular to b1 97 | # = b0 minus component that aligns with b1 98 | # w = projection of b2 onto plane perpendicular to b1 99 | # = b2 minus component that aligns with b1 100 | v = b0 - np.dot(b0, b1)*b1 101 | w = b2 - np.dot(b2, b1)*b1 102 | 103 | # angle between v and w in a plane is the torsion angle 104 | # v and w may not be normalized but that's fine since tan is y/x 105 | x = np.dot(v, w) 106 | y = np.dot(np.cross(b1, v), w) 107 | 108 | return np.arctan2(y, x) -------------------------------------------------------------------------------- /ParaMol/Utils/settings.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/Utils/settings.pyc -------------------------------------------------------------------------------- /ParaMol/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ParaMol - a package for automatic parametrization of molecular mechanics force-fields. 4 | 5 | Code by João Morado. 6 | """ 7 | 8 | __version__ = "1.1.4" 9 | 10 | __all__ = ["System", 11 | "Parameter_space", 12 | "Tasks", 13 | "QM_engines", 14 | "MM_engines", 15 | "Objective_function", 16 | "Optimizers", 17 | "Force_field", 18 | "Utils", 19 | "Tests"] 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ParaMol/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/__init__.pyc -------------------------------------------------------------------------------- /ParaMol/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /ParaMol/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /ParaMol/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/ParaMol/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Continuous Integration Status](https://github.com/JMorado/ParaMol/actions/workflows/paramol_ci.yml/badge.svg) 2 | [![Build Status](https://travis-ci.com/JMorado/ParaMol.svg?branch=master)](https://travis-ci.org/JMorado/ParaMol) 3 | [![Documentation Status](https://readthedocs.org/projects/paramol/badge/?version=latest)](https://paramol.readthedocs.io/en/latest/?badge=latest) 4 | 5 | # ParaMol 6 | 7 | ![ParaMol](docs/source/paramol-white.png) 8 | 9 | 10 | ParaMol is a Python library that aims to ease the process of force field parametrization of molecules. 11 | 12 | Current Version: 1.1.4 13 | 14 | # Quick Installation 15 | The easiest way to install ParaMol it. 16 | 17 | The last stable version can be installed via conda: 18 | 19 | conda install paramol -c jmorado -c ambermd -c conda-forge -c omnia -c rdkit -c anaconda 20 | 21 | # Available Tasks 22 | - Parametrization. 23 | - LLS fitting. 24 | - Adaptive parametrization. 25 | - RESP charge fitting. 26 | - ab initio properties calculation. 27 | - Objective function plot. 28 | - Torsional scans. 29 | - Automatic parametrization of soft torsions. 30 | 31 | # Current features 32 | - Parallel and serial computation of the objective . 33 | - LLS fitting of bonded terms. 34 | - Available symmetrizers: AMBER, GROMACS, CHARMM. 35 | - Optimization algorithms: Scipy Optimizers, Monte Carlo, Gradient Descent, Simulated Annealing. 36 | - QM engines: DFTB+, AMBER, or any QM engine available through ASE. 37 | 38 | # Tests 39 | ParaMol uses the [pytest](https://docs.pytest.org/en/stable/) framework to test the code. pytest can be install through pip: 40 | 41 | pip install -U pytest 42 | 43 | Once pytest is installed, the tests can be run by simply typing: 44 | 45 | python -m pytest 46 | 47 | in ParaMol's root directory. 48 | 49 | # Contact 50 | 51 | ParaMol is developed and maintained by João Morado at the University of Southampton. 52 | 53 | If you have any question or issue to report please contact j.morado@soton.ac.uk. 54 | 55 | # References 56 | 57 | Morado, J.; Mortenson, P. N.; Verdonk, M. L.; Ward, R. A.; Essex, J. W.; Skylaris, C.-K. ParaMol: A Package for Automatic Parameterization of Molecular Mechanics Force Fields. J. Chem. Inf. Model. 2021, acs.jcim.0c01444. https://doi.org/10.1021/acs.jcim.0c01444. 58 | 59 | # Notes 60 | 61 | This library is no longer under active development. 62 | -------------------------------------------------------------------------------- /conda-build/bld.bat: -------------------------------------------------------------------------------- 1 | "%PYTHON%" setup.py install 2 | if errorlevel 1 exit 1 3 | -------------------------------------------------------------------------------- /conda-build/meta.yaml: -------------------------------------------------------------------------------- 1 | # ParaMol conda package builder 2 | 3 | package: 4 | name: 'paramol' 5 | version: 1.1.4 6 | 7 | source: 8 | path: ../ParaMol/ 9 | 10 | build: 11 | number: 1 12 | noarch: python 13 | script: "{{ PYTHON }} -m pip install $RECIPE_DIR/../ -vv" 14 | 15 | requirements: 16 | host: 17 | - python>=3.7 18 | - pip 19 | run: 20 | - python>=3.7 21 | - numpy 22 | - scipy 23 | - openmmtools 24 | - ambertools 25 | - ase 26 | - parmed 27 | - rdkit 28 | - netCDF4 29 | 30 | about: 31 | home: https://github.com/JMorado/ParaMol 32 | license: MIT 33 | license_family: MIT 34 | summary: "ParaMol: A Package for Parametrization of Molecular Mechanics Force Fields" 35 | doc_url: https://paramol.readthedocs.io/ 36 | dev_url: https://github.com/JMorado/ParaMol 37 | 38 | extra: 39 | # GitHub IDs for maintainers of the recipe 40 | recipe-maintainers: 41 | - JMorado 42 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/environment.yml: -------------------------------------------------------------------------------- 1 | name: paramol 2 | channels: 3 | - ambermd 4 | - conda-forge 5 | - omnia 6 | - rdkit 7 | - anaconda 8 | dependencies: 9 | - python>=3.7 10 | - numpy 11 | - scipy 12 | - openmmtools 13 | - ambertools 14 | - ase 15 | - parmed 16 | - rdkit 17 | - netCDF4 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/source/About.rst: -------------------------------------------------------------------------------- 1 | ParaMol 2 | ======= 3 | 4 | Overview 5 | ######### 6 | .. image:: paramol.png 7 | 8 | 9 | ParaMol is a Python library that aims to ease the process of force field parametrization of molecules. 10 | 11 | Current Version: 1.1.4 12 | 13 | About 14 | ####### 15 | ParaMol is developed and maintained by João Morado at the University of Southampton. 16 | 17 | If you have any question or issue to report please contact j.morado@soton.ac.uk. -------------------------------------------------------------------------------- /docs/source/Change_log.rst: -------------------------------------------------------------------------------- 1 | Change Log 2 | ========== 3 | 4 | Version 1.1.4 5 | ------------- 6 | - Implemented nested Markov Chain Monte Carlo algorithm (nMC-MC). 7 | - Self-parametrizing nMC-MC method is now available. 8 | - Added documentation, examples and other info about the nMC-MC method. 9 | - Fixes to torsion_parametrization task. 10 | 11 | Version 1.1.3 12 | ------------- 13 | - Optimized calculation of forces when using ASE. 14 | - Adaptive parameterization calculates forces only if they are required as a property of the objective fucntion. 15 | 16 | Version 1.1.2 17 | ------------- 18 | - Improvements to RESP. Now ParaMol automatically reads the energies from Gaussian .log files 19 | - Small adjustments to examples. 20 | - Reverted scaling of regularization on LLS fitting to the original version. Results from non-linear optimizers and LLS fitting may not coincide as for a similar parameterization situation the number of parameters differs due to the requirement of using 'auxiliary' terms in LLS fitting. General solution will be included in future versions. 21 | 22 | Version 1.1.1 23 | ------------- 24 | - Several improvements to explicit RESP solution. 25 | 26 | Version 1.1.0 27 | ------------- 28 | - Implementation of LLS to derive bonded parameters. Bonds, angles and torsions can now be determined directly through LLS fitting to QM energies. Currently, the only type of regularization that can be used with LLS fitting is the L2 regularization. 29 | - Besides the previously implemented AMBER symmetrized, now GROMACS and CHARMM symmetrizes are also available. 30 | 31 | Version 1.0.2 32 | ------------- 33 | - Fixes and improvements to AmberSymmetrizer. 34 | - Updates to examples. 35 | 36 | Version 1.0.1 37 | ------------- 38 | - Improvements to the RESP procedure. 39 | - RESP: Multiconformational fitting can be now performed using the explicit solver and with different weighting methods. 40 | 41 | Version 1.0.0 42 | ------------- 43 | - Stable release of ParaMol (5th July 2020). 44 | - Available tasks: parametrization, adaptive parametrization, dihedral scans, RESP fitting, objective function plots, ab initio properties. 45 | - MM engines: OpenMM, RESP. 46 | - QM engines: ASE, DFTB+, AMBER. 47 | -------------------------------------------------------------------------------- /docs/source/Examples.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ========= 3 | 4 | Here you can find some examples of how to use ParaMol to derive force field parameters. 5 | 6 | .. toctree:: 7 | Examples/Example_1/Example_1.rst 8 | Examples/Example_2/Example_2.rst 9 | Examples/Example_3/Example_3.rst 10 | Examples/Example_4/Example_4.rst 11 | Examples/Example_5/Example_5.rst 12 | Examples/Example_6/Example_6.rst 13 | Examples/Example_7/Example_7.rst 14 | Examples/Example_8/Example_8.rst 15 | Examples/Example_9/Example_9.rst 16 | 17 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_1/Example_1.rst: -------------------------------------------------------------------------------- 1 | Example 1: A simple, trivial example - Parametrization of the carbon monoxide bond 2 | ========================================================================================= 3 | 4 | Note that, in order to use DFTB+ as a calculator in ASE, one has to make sure that the environment variables `DFTB_PREFIX` and `DFTB_COMMAND` are correctly set. For more information see: https://wiki.fysik.dtu.dk/ase/ase/calculators/dftb.html. 5 | 6 | .. literalinclude:: ../../../../Examples/Example_1/example_1.py 7 | :language: python 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_2/Example_2.rst: -------------------------------------------------------------------------------- 1 | Example 2: RESP charge fitting of aniline 2 | ========================================================================================= 3 | 4 | Fitting of charges 5 | ################## 6 | 7 | 8 | In order to generate the electrostatic potential of aniline, first we will optimise the geometry of aniline at the B3LYP/6-31G* level. This is the usual level of theory used for small molecules and transition-metal complexes accurate calculations), whereas calculations at the AM1 level of theory are usually performed for large organic molecules (relatively crude calculations). We will use Gaussian to perform the optimization. The Gaussian input file reads: 9 | 10 | .. literalinclude:: gaussian_calculations/aniline.com 11 | :language: text 12 | :caption: Geometry optimization Gaussian input file. 13 | 14 | Furthermore, in order too calculate the electrostatic potential, we will run a Gaussian single-point energy calculation, at the HF/6-31G* level (without transition metals) or at the B3LYP/DZpdf/6-31G* level. The following keywods have to be used: 15 | 16 | - IOp(6/33=2) makes Gaussian write out the potential points and potentials (do not change) 17 | - IOp(6/41=10) specifies that 10 concentric layers of points are used for each atom (do not change) 18 | - IOp(6/42) gives the density of points in each layer. A value of 17 gives about 2500 points/atom. Lower values may be needed for large molecules, since the programs cannot normally handle more than 100 000 potential points. A value of 10 gives about 1000 points/atom. 19 | 20 | The Gaussian input file for this calculation reads: 21 | 22 | .. literalinclude:: gaussian_calculations/aniline_opt.com 23 | :language: text 24 | :caption: ESP calculation Gaussian input file. 25 | 26 | Finally, in order to read the ESP data into ParaMol and perform RESP charge fitting, the following 27 | 28 | .. literalinclude:: ../../../../Examples/Example_2/example_2.py 29 | :language: python 30 | 31 | 32 | Comparision of the ESP charges 33 | ############################### 34 | 35 | We may now check the results obtained using the solvers available in ParaMol ('scipy' and 'explicit'). 36 | 37 | .. literalinclude:: aniline_resp_scipy.ff 38 | :language: text 39 | :caption: ESP charges obtained when using the 'SLSQP' SciPy optimizer ('scipy' solver). 40 | 41 | .. literalinclude:: aniline_resp_explicit.ff 42 | :language: text 43 | :caption: ESP charges obtained when using the 'explicit' solver. 44 | 45 | .. literalinclude:: gaussian_calculations/esp_charges_gaussian.dat 46 | :language: text 47 | :caption: ESP charges as calculated by Gaussian. 48 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_2/aniline_resp_explicit.ff: -------------------------------------------------------------------------------- 1 | NonbondedForce 3 2 | 0 0 -0.06286283 0.33996695 0.35982400 1 0 0 X 3 | 1 1 -0.36913364 0.33996695 0.35982400 1 0 0 X 4 | 2 2 0.50319411 0.33996695 0.35982400 1 0 0 X 5 | 3 3 -0.36913297 0.33996695 0.35982400 1 0 0 X 6 | 4 4 -0.06285939 0.33996695 0.35982400 1 0 0 X 7 | 5 5 -0.23913232 0.33996695 0.35982400 1 0 0 X 8 | 6 6 0.13628034 0.25996425 0.06276000 1 0 0 X 9 | 7 7 0.18140134 0.25996425 0.06276000 1 0 0 X 10 | 8 8 0.18140069 0.25996425 0.06276000 1 0 0 X 11 | 9 9 0.13627925 0.25996425 0.06276000 1 0 0 X 12 | 10 10 0.14549336 0.25996425 0.06276000 1 0 0 X 13 | 11 11 -0.92005714 0.32499985 0.71128000 1 0 0 X 14 | 12 12 0.36956380 0.10690785 0.06568880 1 0 0 X 15 | 13 13 0.36956540 0.10690785 0.06568880 1 0 0 X 16 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_2/aniline_resp_scipy.ff: -------------------------------------------------------------------------------- 1 | NonbondedForce 3 2 | 0 0 -0.06152112 0.33996695 0.35982400 1 0 0 X 3 | 1 1 -0.37029657 0.33996695 0.35982400 1 0 0 X 4 | 2 2 0.50425830 0.33996695 0.35982400 1 0 0 X 5 | 3 3 -0.37030046 0.33996695 0.35982400 1 0 0 X 6 | 4 4 -0.06152352 0.33996695 0.35982400 1 0 0 X 7 | 5 5 -0.24057025 0.33996695 0.35982400 1 0 0 X 8 | 6 6 0.13601036 0.25996425 0.06276000 1 0 0 X 9 | 7 7 0.18160558 0.25996425 0.06276000 1 0 0 X 10 | 8 8 0.18160579 0.25996425 0.06276000 1 0 0 X 11 | 9 9 0.13601494 0.25996425 0.06276000 1 0 0 X 12 | 10 10 0.14580236 0.25996425 0.06276000 1 0 0 X 13 | 11 11 -0.92021579 0.32499985 0.71128000 1 0 0 X 14 | 12 12 0.36956553 0.10690785 0.06568880 1 0 0 X 15 | 13 13 0.36956488 0.10690785 0.06568880 1 0 0 X 16 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_2/gaussian_calculations/aniline.com: -------------------------------------------------------------------------------- 1 | %chk=aniline.chk 2 | # b3lyp/6-31g* opt=tight 3 | 4 | Title Card Required 5 | 6 | 0 1 7 | C -0.53956834 1.85851314 0.00000000 8 | C 0.85559166 1.85851314 0.00000000 9 | C 1.55312966 3.06626414 0.00000000 10 | C 0.85547566 4.27477314 -0.00119900 11 | C -0.53934934 4.27469514 -0.00167800 12 | C -1.23695034 3.06648914 -0.00068200 13 | H -1.08932734 0.90619614 0.00045000 14 | H 1.40509966 0.90600014 0.00131500 15 | H 1.40567566 5.22691614 -0.00125800 16 | H -1.08947134 5.22697614 -0.00263100 17 | H -2.33655434 3.06667214 -0.00086200 18 | N 3.02312941 3.06637108 0.00084750 19 | H 3.35602581 2.59534128 0.81773851 20 | H 3.35696733 2.59464054 -0.81525454 21 | 22 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_2/gaussian_calculations/aniline_opt.com: -------------------------------------------------------------------------------- 1 | %chk=aniline_opt.chk 2 | # HF/6-31G* SCF=Tight Pop=MK IOp(6/33=2,6/41=10,6/42=17) 3 | 4 | Title Card Required 5 | 6 | 0 1 7 | C 1.17182300 1.20260700 -0.00337800 8 | C -0.22125800 1.20825000 0.00517500 9 | C -0.93874400 0.00000500 0.01013900 10 | C -0.22126400 -1.20824500 0.00517400 11 | C 1.17181400 -1.20261300 -0.00337600 12 | C 1.88169200 -0.00000400 -0.00833000 13 | H 1.70568500 2.14975100 -0.00879700 14 | H -0.76331600 2.15175300 0.01327800 15 | H -0.76333600 -2.15174000 0.01327300 16 | H 1.70567000 -2.14976000 -0.00879700 17 | H 2.96765300 -0.00000700 -0.01660800 18 | N -2.33738000 0.00000100 0.07891000 19 | H -2.77753500 0.83490500 -0.28857500 20 | H -2.77753600 -0.83490600 -0.28856700 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_2/gaussian_calculations/esp_charges_gaussian.dat: -------------------------------------------------------------------------------- 1 | Fitting point charges to electrostatic potential 2 | Charges from ESP fit, RMS= 0.00123 RRMS= 0.10456: 3 | ESP charges: 4 | 1 5 | 1 C -0.062863 6 | 2 C -0.369134 7 | 3 C 0.503195 8 | 4 C -0.369134 9 | 5 C -0.062859 10 | 6 C -0.239133 11 | 7 H 0.136280 12 | 8 H 0.181401 13 | 9 H 0.181401 14 | 10 H 0.136279 15 | 11 H 0.145494 16 | 12 N -0.920057 17 | 13 H 0.369564 18 | 14 H 0.369565 19 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_3/Example_3.rst: -------------------------------------------------------------------------------- 1 | Example 3: Example of adaptive parametrization using caffeine 2 | ======================================================================== 3 | 4 | .. image:: caffeine.png 5 | :align: center 6 | 7 | Adaptive parametrization 8 | ########################## 9 | 10 | In this example we are going to use ParaMol's adaptive parametrization Task (:obj:`ParaMol.Tasks.adaptive_parametrization.AdaptiveParametrization`) to self-consistently parametrize caffeine. This task performs iterative sampling and parametrization. 11 | 12 | .. literalinclude:: ../../../../Examples/Example_3/example_3.py 13 | :language: python 14 | 15 | 16 | Quality of the parametrization 17 | ############################### 18 | 19 | Finally, let us assess the quality of the parametrization by determining the correlation between the :math:`F^{MM}` and :math:`F^{QM}` forces of the original and re-parametrized force field. 20 | 21 | For this purpose, we are going to use generate 1000 conformations obtained through molecular dynamics simulation using the re-parametrized force field. The previous example could be modified to perform this task in the following way: 22 | 23 | .. literalinclude:: ../../../../Examples/Example_3/example_3_quality.py 24 | :language: python 25 | 26 | 27 | .. image:: caffeine_energies_dftb_no_wham.png 28 | :align: center 29 | 30 | .. image:: caffeine_forces_dftb_no_wham.png 31 | :align: center 32 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_3/caffeine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/Examples/Example_3/caffeine.png -------------------------------------------------------------------------------- /docs/source/Examples/Example_3/caffeine_energies_dftb_no_wham.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/Examples/Example_3/caffeine_energies_dftb_no_wham.png -------------------------------------------------------------------------------- /docs/source/Examples/Example_3/caffeine_forces_dftb_no_wham.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/Examples/Example_3/caffeine_forces_dftb_no_wham.png -------------------------------------------------------------------------------- /docs/source/Examples/Example_4/Example_4.rst: -------------------------------------------------------------------------------- 1 | Example 4: Example of atom-type symmetry-constrained parametrization using aspirin 2 | =================================================================================== 3 | 4 | .. image:: aspirin.png 5 | :align: center 6 | 7 | In this example we will parametrize aspirin while constraining the optimization of the parameters to the atom-type symmetries defined by AMBER. In the parametrization we will use a data set of conformations (and respective eneriges and forces) obtained using a Born-Oppenheimer MD at the DFTB level of theory (including D3 dispersion correction). 8 | 9 | Serial Version 10 | ############################### 11 | 12 | .. literalinclude:: ../../../../Examples/Example_4/example_4_serial.py 13 | :language: python 14 | 15 | Parallel version 16 | ############################### 17 | It is also possible to parallelize the calculation of the objective function using, for example, 4 cpus. In order to do this, the following changes have to be made: 18 | 19 | .. literalinclude:: ../../../../Examples/Example_4/example_4_parallel.py 20 | :language: python 21 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_4/aspirin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/Examples/Example_4/aspirin.png -------------------------------------------------------------------------------- /docs/source/Examples/Example_5/Example_5.rst: -------------------------------------------------------------------------------- 1 | Example 5: Example of torsional scan using a norfloxacin analog 2 | ================================================================ 3 | 4 | Torsional scan recipe 5 | ###################### 6 | 7 | .. image:: norfloxacin.png 8 | :align: center 9 | 10 | In this example we are going to use ParaMol's torsional scan Task (:obj:`ParaMol.Tasks.torsions_scan.TorsionScan`) to parametrize a torsion of the norfloxacin analog represented above. 11 | First of all, we are going to symmetrize the ParaMol Force Field so that it respects atom-type symmetries and write it to a file in order to choose what torsions we want to parametrize. 12 | 13 | 14 | .. literalinclude:: ../../../../Examples/Example_5/example_5_write_ff.py 15 | :language: python 16 | 17 | We are interested in parametrizing the torsions around the C11-N4 bond. Hence, the next step is to modify the ParaMol Force Field file in order to set as optimizable all torsions's parameters involved in the rotation of C11 and N4, specifically the phase and barrier heights of these torsions (ParaMol cannot optimize the periodicity). This can be achieved by performing the following modifications on the ParaMol Force Field file: 18 | 19 | .. literalinclude:: norfloxacin_symm_original.ff 20 | :language: text 21 | :caption: Original ParaMol Force Field file. 22 | 23 | .. literalinclude:: norfloxacin_symm_mod.ff 24 | :language: text 25 | :caption: Modified ParaMol Force Field file. 26 | 27 | Now that we have done the necessary changes in the ParaMol Force Field file, we are ready to perform the torsional scan and subsequent parameters's optimization. Luckily, as all the torsions around the C11-N4 are of the same type and, therefore, they share the same set of parameters, we only need to perform the torsional scan of one of the torsions with symmetry T8. Furthermore, when asking ParaMol to create its Force Field representation, we need to provide the modified ParaMol Force Field file so that ParaMol creates its internal representation of the Force Field from this file. The same procedure can be done to set special constraints or to optimize other parameters. 28 | 29 | .. literalinclude:: ../../../../Examples/Example_5/example_5.py 30 | :language: python 31 | 32 | Alternative method (preferred) 33 | ############################### 34 | Alternatively, we could have avoided changing manually the Force Field file if we had used the :obj:`ParaMol.Force_field.force_field.ForceField.optimize_torsions_by_symmetry` function. Hence, the whole procedure could be performed using the following code: 35 | 36 | .. literalinclude:: ../../../../Examples/Example_5/example_5_alternative.py 37 | :language: python 38 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_5/norfloxacin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/Examples/Example_5/norfloxacin.png -------------------------------------------------------------------------------- /docs/source/Examples/Example_5/norfloxacin_symm_mod.ff: -------------------------------------------------------------------------------- 1 | 87 7 4 11 13 2.00000000 3.14159400 4.39320000 0 1 1 T8 2 | 88 7 4 11 15 2.00000000 3.14159400 4.39320000 0 1 1 T8 3 | ... 4 | 92 8 4 11 13 2.00000000 3.14159400 4.39320000 0 1 1 T8 5 | 93 8 4 11 15 2.00000000 3.14159400 4.39320000 0 1 1 T8 6 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_5/norfloxacin_symm_original.ff: -------------------------------------------------------------------------------- 1 | 87 7 4 11 13 2.00000000 3.14159400 4.39320000 0 0 0 T8 2 | 88 7 4 11 15 2.00000000 3.14159400 4.39320000 0 0 0 T8 3 | ... 4 | 92 8 4 11 13 2.00000000 3.14159400 4.39320000 0 0 0 T8 5 | 93 8 4 11 15 2.00000000 3.14159400 4.39320000 0 0 0 T8 6 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_6/Example_6.rst: -------------------------------------------------------------------------------- 1 | Example 6: Example of how to restart a calculation 2 | ================================================== 3 | 4 | Restarting a calculation in ParaMol is as simple as passing the argument :obj:`restart=True` into the :obj:`task.run_task` method: 5 | 6 | 7 | .. code-block:: python 8 | 9 | from ParaMol.Tasks.parametrization import * 10 | from ParaMol.Utils.settings import * 11 | 12 | [...] 13 | 14 | paramol_settings = Settings() 15 | 16 | parametrization = Parametrization() 17 | parametrization.run_task(paramol_settings, ..., restart=True) 18 | 19 | [...] 20 | 21 | The argument :obj:`restart=True` can be used in the :obj:`run_task` method of the following built-in tasks: 22 | 23 | 24 | - :obj:`ParaMol.Tasks.parametrization.Parametrization` 25 | 26 | A checkpoint file of the :obj:`ParaMol.Parameter_space.parameter_space` is written with a frequency defined by the :obj:`paramol_settings.objective_function["checkpoint_freq"]` variable. The name of this file is defined in the variable :obj:`paramol_settings.restart["restart_parameter_space_file"]`. 27 | Furthermore, a checkpoint file is also stored after the optimization procedures finishes, which is useful in order restart an adaptive parametrization with the correct :obj:`ParameterSpace` state. 28 | 29 | - :obj:`ParaMol.Tasks.adaptive_parametrization.AdaptiveParametrization` 30 | 31 | A checkpoint file with the adaptive parametrization procedure state is stored after every iteration of the algorithm. 32 | The name of this checkpoint file is defined in the variable :obj:`paramol_settings.restart["restart_adaptive_parametrization_file"]`. 33 | Additionally, at the end of every sampling iteration, a :doc:`NetCDF file <../../Files_specification>` containing system's information, such as coordinates, energies and forces is saved in a file named :obj:`restart_[system.name]_data.nc`. 34 | This task performs restarts of the :obj:`ParaMol.Tasks.Parametrization.parametrization` task. 35 | 36 | - :obj:`ParaMol.Tasks.torsions_parametrization.TorsionsParametrization` 37 | 38 | A checkpoint file with the state of the procedure used to automatically parametrize soft torsions is stored after the scan of a soft dihedral is completed. Furthermore, as this task resorts to :obj:`ParaMol.Tasks.torsions_scan.TorsionScan`, its respective checkpoint files are also saved. 39 | The name of the :obj:`TorsionsParametrization` checkpoint file is defined in the variable :obj:`paramol_settings.restart["restart_soft_torsions_file"]`. No restart of the :obj:`ParaMol.Tasks.Parametrization.parametrization` task is performed in this task, which means that if an optimization is stopped, upon restart it will start from the beginning. 40 | 41 | - :obj:`ParaMol.Tasks.torsions_scan.TorsionScan` 42 | 43 | A checkpoint file with the torsional scan state is stored after every geometry optimization. 44 | The name of this checkpoint file is defined in the variable :obj:`paramol_settings.restart["restart_scan_file"]`. 45 | 46 | 47 | The checkpoint files are Python Pickle files that store the instance dictionaries of the previously indicated classes. These are saved into a directory with a name defined by the :obj:`paramol_settings.restart["restart_dir"]` variable. 48 | 49 | More information about how to control the names of the checkpoint files can be found at the ParaMol Settings :doc:`documentation page <../../ParaMol_settings>`. 50 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_7/Example_7.rst: -------------------------------------------------------------------------------- 1 | Example 7: Example of multiple system parametrization 2 | ========================================================================= 3 | 4 | Mapping of different topologies 5 | ################################## 6 | 7 | ParaMol is able to parametrize multiple systems at the same time. 8 | Even though this is possible to do without applying any symmetry constraint, in the context of force field development it is often desirable to derive the parameters for a given term type and for a set of molecules. 9 | Therefore, in this example we are going to concomitantly optimize the barrier height of the dihedral type hc-c3-c3-hc for ethane and propane. 10 | 11 | **NOTE:** When optimizing more than once system at once, the mapping of the symmetry groups of different systems has to be performed manually so that there is a one-to-one correspondence between symmetry group and term type. 12 | The automatic mapping of symmetries for different systems is a feature that will likely be implemented in future ParaMol versions. 13 | 14 | 15 | The first step is to write out the ParaMol Force Field files so that the correct symmetries are set, which can be done using the following code: 16 | 17 | 18 | .. literalinclude:: ../../../../Examples/Example_7/example_7_write_ff.py 19 | :language: python 20 | 21 | 22 | 23 | .. literalinclude:: ethane_symm_original.ff 24 | :language: text 25 | :caption: Original ethane ParaMol Force Field file. 26 | 27 | .. literalinclude:: propane_symm_original.ff 28 | :language: text 29 | :caption: Original propane ParaMol Force Field file. 30 | 31 | As can be seen in the ParaMol Force Field files, all term types belong to the default symmetry group, *i.e.*, "X", which means that they do not possess any symmetry. 32 | We will set the symmetry label of the dihedral types hc-c3-c3-hc to "T0" (see modified ParaMol Force Fields below). In this way, we will be able to find the best barrier height that minimizes the objective function for both ethane and propane. 33 | 34 | 35 | .. literalinclude:: ethane_symm_mod.ff 36 | :language: text 37 | :caption: Modified ethane ParaMol Force Field file. 38 | 39 | .. literalinclude:: propane_symm_mod.ff 40 | :language: text 41 | :caption: Modified propane ParaMol Force Field file. 42 | 43 | 44 | 45 | Simultaneous parametrization of multiple systems 46 | ################################################## 47 | 48 | Now that we have done the necessary changes in the ParaMol Force Field files, we are ready to perform the conformational sampling, *ab initio* properties calculation and subsequent parameters' optimization. 49 | This can be done using the following script: 50 | 51 | .. literalinclude:: ../../../../Examples/Example_7/example_7.py 52 | :language: python 53 | 54 | 55 | Finally, as can be seen in the final ParaMol Force Field files, a new barrier height value was found that best suits both systems. 56 | Specifically, GAFF slightly overestimates the barrier height of this torsions with respect to the SCC-DFTB-D3 level of theory, since, after re-parametrization, its values has decreased from 0.6276 kj/mol to 0.4690 kj/mol. 57 | 58 | .. literalinclude:: ethane_symm_opt.ff 59 | :language: text 60 | :caption: Final ethane ParaMol Force Field file. 61 | 62 | .. literalinclude:: propane_symm_opt.ff 63 | :language: text 64 | :caption: Final propane ParaMol Force Field file. 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /docs/source/Examples/Example_7/ethane_symm_mod.ff: -------------------------------------------------------------------------------- 1 | ... 2 | PeriodicTorsionForce 2 3 | 0 1 0 4 5 3.00000000 0.00000000 0.62760000 0 0 1 T0 4 | 1 1 0 4 6 3.00000000 0.00000000 0.62760000 0 0 1 T0 5 | 2 1 0 4 7 3.00000000 0.00000000 0.62760000 0 0 1 T0 6 | 3 2 0 4 5 3.00000000 0.00000000 0.62760000 0 0 1 T0 7 | 4 2 0 4 6 3.00000000 0.00000000 0.62760000 0 0 1 T0 8 | 5 2 0 4 7 3.00000000 0.00000000 0.62760000 0 0 1 T0 9 | 6 3 0 4 5 3.00000000 0.00000000 0.62760000 0 0 1 T0 10 | 7 3 0 4 6 3.00000000 0.00000000 0.62760000 0 0 1 T0 11 | 8 3 0 4 7 3.00000000 0.00000000 0.62760000 0 0 1 T0 12 | ... -------------------------------------------------------------------------------- /docs/source/Examples/Example_7/ethane_symm_opt.ff: -------------------------------------------------------------------------------- 1 | ... 2 | PeriodicTorsionForce 2 3 | 0 1 0 4 5 3.00000000 0.00000000 0.46899172 0 0 1 T0 4 | 1 1 0 4 6 3.00000000 0.00000000 0.46899172 0 0 1 T0 5 | 2 1 0 4 7 3.00000000 0.00000000 0.46899172 0 0 1 T0 6 | 3 2 0 4 5 3.00000000 0.00000000 0.46899172 0 0 1 T0 7 | 4 2 0 4 6 3.00000000 0.00000000 0.46899172 0 0 1 T0 8 | 5 2 0 4 7 3.00000000 0.00000000 0.46899172 0 0 1 T0 9 | 6 3 0 4 5 3.00000000 0.00000000 0.46899172 0 0 1 T0 10 | 7 3 0 4 6 3.00000000 0.00000000 0.46899172 0 0 1 T0 11 | 8 3 0 4 7 3.00000000 0.00000000 0.46899172 0 0 1 T0 12 | ... -------------------------------------------------------------------------------- /docs/source/Examples/Example_7/ethane_symm_original.ff: -------------------------------------------------------------------------------- 1 | ... 2 | PeriodicTorsionForce 2 3 | 0 1 0 4 5 3.00000000 0.00000000 0.62760000 0 0 0 X 4 | 0 0 0 4 6 3.00000000 0.00000000 0.62760000 0 0 0 X 5 | 2 1 0 4 7 3.00000000 0.00000000 0.62760000 0 0 0 X 6 | 3 2 0 4 5 3.00000000 0.00000000 0.62760000 0 0 0 X 7 | 4 2 0 4 6 3.00000000 0.00000000 0.62760000 0 0 0 X 8 | 5 2 0 4 7 3.00000000 0.00000000 0.62760000 0 0 0 X 9 | 6 3 0 4 5 3.00000000 0.00000000 0.62760000 0 0 0 X 10 | 7 3 0 4 6 3.00000000 0.00000000 0.62760000 0 0 0 X 11 | 8 3 0 4 7 3.00000000 0.00000000 0.62760000 0 0 0 X 12 | ... -------------------------------------------------------------------------------- /docs/source/Examples/Example_7/propane_symm_mod.ff: -------------------------------------------------------------------------------- 1 | ... 2 | PeriodicTorsionForce 2 3 | 0 0 4 7 8 3.00000000 0.00000000 0.66944000 0 0 0 X 4 | 1 0 4 7 9 3.00000000 0.00000000 0.66944000 0 0 0 X 5 | 2 0 4 7 10 3.00000000 0.00000000 0.66944000 0 0 0 X 6 | 3 1 0 4 5 3.00000000 0.00000000 0.62760000 0 0 1 T0 7 | 4 1 0 4 6 3.00000000 0.00000000 0.62760000 0 0 1 T0 8 | 5 1 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 9 | 6 2 0 4 5 3.00000000 0.00000000 0.62760000 0 0 1 T0 10 | 7 2 0 4 6 3.00000000 0.00000000 0.62760000 0 0 1 T0 11 | 8 2 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 12 | 9 3 0 4 5 3.00000000 0.00000000 0.62760000 0 0 1 T0 13 | 10 3 0 4 6 3.00000000 0.00000000 0.62760000 0 0 1 T0 14 | 11 3 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 15 | 12 5 4 7 8 3.00000000 0.00000000 0.62760000 0 0 1 T0 16 | 13 5 4 7 9 3.00000000 0.00000000 0.62760000 0 0 1 T0 17 | 14 5 4 7 10 3.00000000 0.00000000 0.62760000 0 0 1 T0 18 | 15 6 4 7 8 3.00000000 0.00000000 0.62760000 0 0 1 T0 19 | 16 6 4 7 9 3.00000000 0.00000000 0.62760000 0 0 1 T0 20 | 17 6 4 7 10 3.00000000 0.00000000 0.62760000 0 0 1 T0 21 | ... -------------------------------------------------------------------------------- /docs/source/Examples/Example_7/propane_symm_opt.ff: -------------------------------------------------------------------------------- 1 | ... 2 | PeriodicTorsionForce 2 3 | 0 0 4 7 8 3.00000000 0.00000000 0.66944000 0 0 0 X 4 | 1 0 4 7 9 3.00000000 0.00000000 0.66944000 0 0 0 X 5 | 2 0 4 7 10 3.00000000 0.00000000 0.66944000 0 0 0 X 6 | 3 1 0 4 5 3.00000000 0.00000000 0.46899172 0 0 1 T0 7 | 4 1 0 4 6 3.00000000 0.00000000 0.46899172 0 0 1 T0 8 | 5 1 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 9 | 6 2 0 4 5 3.00000000 0.00000000 0.46899172 0 0 1 T0 10 | 7 2 0 4 6 3.00000000 0.00000000 0.46899172 0 0 1 T0 11 | 8 2 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 12 | 9 3 0 4 5 3.00000000 0.00000000 0.46899172 0 0 1 T0 13 | 10 3 0 4 6 3.00000000 0.00000000 0.46899172 0 0 1 T0 14 | 11 3 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 15 | 12 5 4 7 8 3.00000000 0.00000000 0.46899172 0 0 1 T0 16 | 13 5 4 7 9 3.00000000 0.00000000 0.46899172 0 0 1 T0 17 | 14 5 4 7 10 3.00000000 0.00000000 0.46899172 0 0 1 T0 18 | 15 6 4 7 8 3.00000000 0.00000000 0.46899172 0 0 1 T0 19 | 16 6 4 7 9 3.00000000 0.00000000 0.46899172 0 0 1 T0 20 | 17 6 4 7 10 3.00000000 0.00000000 0.46899172 0 0 1 T0 21 | ... -------------------------------------------------------------------------------- /docs/source/Examples/Example_7/propane_symm_original.ff: -------------------------------------------------------------------------------- 1 | ... 2 | PeriodicTorsionForce 2 3 | 0 0 4 7 8 3.00000000 0.00000000 0.66944000 0 0 0 X 4 | 1 0 4 7 9 3.00000000 0.00000000 0.66944000 0 0 0 X 5 | 2 0 4 7 10 3.00000000 0.00000000 0.66944000 0 0 0 X 6 | 3 1 0 4 5 3.00000000 0.00000000 0.62760000 0 0 0 X 7 | 4 1 0 4 6 3.00000000 0.00000000 0.62760000 0 0 0 X 8 | 5 1 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 9 | 6 2 0 4 5 3.00000000 0.00000000 0.62760000 0 0 0 X 10 | 7 2 0 4 6 3.00000000 0.00000000 0.62760000 0 0 0 X 11 | 8 2 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 12 | 9 3 0 4 5 3.00000000 0.00000000 0.62760000 0 0 0 X 13 | 10 3 0 4 6 3.00000000 0.00000000 0.62760000 0 0 0 X 14 | 11 3 0 4 7 3.00000000 0.00000000 0.66944000 0 0 0 X 15 | 12 5 4 7 8 3.00000000 0.00000000 0.62760000 0 0 0 X 16 | 13 5 4 7 9 3.00000000 0.00000000 0.62760000 0 0 0 X 17 | 14 5 4 7 10 3.00000000 0.00000000 0.62760000 0 0 0 X 18 | 15 6 4 7 8 3.00000000 0.00000000 0.62760000 0 0 0 X 19 | 16 6 4 7 9 3.00000000 0.00000000 0.62760000 0 0 0 X 20 | 17 6 4 7 10 3.00000000 0.00000000 0.62760000 0 0 0 X 21 | ... -------------------------------------------------------------------------------- /docs/source/Examples/Example_8/Example_8.rst: -------------------------------------------------------------------------------- 1 | Example 8: Example of sampling using a nested Markov chain Monte Carlo algorithm 2 | ================================================================================= 3 | 4 | ParaMol has implemented a nested Markov chain Monte Carlo (nMC-MC) algorithm that combines sampling at the MM level 5 | with periodic switching attempts to the QM level. This nMC-MC algorithm works by firstly resorting to the 6 | hybrid Monte Carlo (hMC) scheme to rigorously generate configurations that belong to a target MM ensemble. 7 | These are subsequently used as trial states for a second Markov chain, 8 | wherein they are accepted or rejected according to a correction step based 9 | on the difference between the MM and QM potentials. 10 | 11 | 12 | .. figure:: nmc_mc_diagram.png 13 | :align: center 14 | 15 | 16 | Diagram describing the workflow of nMC-MC algorithm as implemented in ParaMol. 17 | 18 | .. 19 | Further information about this method can be found in 20 | 21 | Single sampler: Serial Version 22 | ############################### 23 | 24 | .. literalinclude:: ../../../../Examples/Example_8/example_8_serial.py 25 | :language: python 26 | 27 | 28 | Multiple Samplers: Parallel Version 29 | #################################### 30 | 31 | .. literalinclude:: ../../../../Examples/Example_8/example_8_parallel.py 32 | :language: python -------------------------------------------------------------------------------- /docs/source/Examples/Example_8/nmc_mc_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/Examples/Example_8/nmc_mc_diagram.png -------------------------------------------------------------------------------- /docs/source/Examples/Example_9/Example_9.rst: -------------------------------------------------------------------------------- 1 | Example 9: Example of self-parameterizing nMC-MC 2 | ========================================================================================= 3 | 4 | Self-parameterizing methodology that iteratively couples the nMC-MC algorithm with a parameterization step. 5 | This algorithm allows on-the-fly derivation of bespoke FFs owing to its capability of performing sampling of 6 | relevant configurations and subsequent optimization of the FF parameters, all in one scheme. 7 | 8 | Self-parameterizing nMC-MC 9 | ############################### 10 | 11 | .. literalinclude:: ../../../../Examples/Example_9/example_9_serial_param.py 12 | :language: python 13 | 14 | -------------------------------------------------------------------------------- /docs/source/Installation.rst: -------------------------------------------------------------------------------- 1 | Installation 2 | ============ 3 | 4 | Quick Install 5 | ------------- 6 | 7 | 8 | ParaMol has been extensively tested both on Linux and OS X platforms and all its features work as expected. 9 | Nevertheless, it has never been tested on Windows. It is expected that most of ParaMol features work correctly 10 | on this platform except the parallel capabilities (Windows does not support forks). 11 | Therefore, please remember that Windows is not natively supported by ParaMol. 12 | 13 | The easiest way to install ParaMol is via the conda package manager: 14 | 15 | .. code-block:: 16 | 17 | conda install paramol -c jmorado -c ambermd -c conda-forge -c omnia -c rdkit -c anaconda 18 | 19 | For the development version use: 20 | 21 | .. code-block:: 22 | 23 | conda install paramol-dev -c jmorado -c ambermd -c conda-forge -c omnia -c rdkit -c anaconda 24 | 25 | Source Code 26 | ------------ 27 | 28 | ParaMol is an open source code and it has a github repository: 29 | 30 | https://github.com/JMorado/ParaMol -------------------------------------------------------------------------------- /docs/source/ParaMol.rst: -------------------------------------------------------------------------------- 1 | Library Documentation 2 | ===================== 3 | 4 | .. automodule:: ParaMol 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | :caption: Contents: 12 | 13 | ParaMol_Package/ParaMol.System 14 | ParaMol_Package/ParaMol.Force_field 15 | ParaMol_Package/ParaMol.Tasks 16 | ParaMol_Package/ParaMol.Objective_function 17 | ParaMol_Package/ParaMol.Parameter_space 18 | ParaMol_Package/ParaMol.Optimizers 19 | ParaMol_Package/ParaMol.QM_engines 20 | ParaMol_Package/ParaMol.MM_engines 21 | ParaMol_Package/ParaMol.Utils 22 | ParaMol_Package/ParaMol.HMC 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Force_field.force_field.rst: -------------------------------------------------------------------------------- 1 | Force_field.force_field module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.Force_field.force_field 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Force_field.force_field_term.rst: -------------------------------------------------------------------------------- 1 | Force_field.force_field_term module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.Force_field.force_field_term 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Force_field.force_field_term_parameter.rst: -------------------------------------------------------------------------------- 1 | Force_field.force_field_term_parameter module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.Force_field.force_field_term_parameter 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Force_field.rst: -------------------------------------------------------------------------------- 1 | ParaMol.Force_field subpackage 2 | =============================== 3 | 4 | .. automodule:: ParaMol.Force_field 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | ParaMol.Force_field.force_field 14 | ParaMol.Force_field.force_field_term 15 | ParaMol.Force_field.force_field_term_parameter -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.HMC.hmc_sampler.rst: -------------------------------------------------------------------------------- 1 | HMC.hmc_sampler module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.HMC.hmc_sampler 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.HMC.hmc_sampler_qm_mm.rst: -------------------------------------------------------------------------------- 1 | HMC.hmc_sampler_qm_mm module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.HMC.hmc_sampler_qm_mm 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.HMC.rst: -------------------------------------------------------------------------------- 1 | ParaMol.HMC subpackage 2 | ================================== 3 | 4 | .. automodule:: ParaMol.HMC 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | ParaMol.HMC.hmc_sampler 14 | ParaMol.HMC.hmc_sampler_qm_mm -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.MM_engines.openmm.rst: -------------------------------------------------------------------------------- 1 | MM_engines.openmm module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.MM_engines.openmm 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.MM_engines.resp.rst: -------------------------------------------------------------------------------- 1 | MM_engines.resp module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.MM_engines.resp 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.MM_engines.rst: -------------------------------------------------------------------------------- 1 | ParaMol.MM_engines subpackage 2 | ================================== 3 | 4 | .. automodule:: ParaMol.MM_engines 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | 12 | ParaMol.MM_engines.openmm 13 | ParaMol.MM_engines.resp -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.Properties.energy_property.rst: -------------------------------------------------------------------------------- 1 | Objective_function.Properties.energy_property module 2 | ============================================================= 3 | 4 | 5 | .. automodule:: ParaMol.Objective_function.Properties.energy_property 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.Properties.esp_property.rst: -------------------------------------------------------------------------------- 1 | Objective_function.Properties.esp_property module 2 | ============================================================= 3 | 4 | .. automodule:: ParaMol.Objective_function.Properties.esp_property 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.Properties.force_property.rst: -------------------------------------------------------------------------------- 1 | Objective_function.Properties.force_property module 2 | ============================================================= 3 | 4 | .. automodule:: ParaMol.Objective_function.Properties.force_property 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.Properties.property.rst: -------------------------------------------------------------------------------- 1 | Objective_function.Properties.property module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.Objective_function.Properties.property 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.Properties.regularization.rst: -------------------------------------------------------------------------------- 1 | Objective_function.Properties.regularization module 2 | ============================================================= 3 | 4 | .. automodule:: ParaMol.Objective_function.Properties.regularization 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.Properties.rst: -------------------------------------------------------------------------------- 1 | Objective_function.Properties subsubpackage 2 | ============================================= 3 | 4 | 5 | .. automodule:: ParaMol.Objective_function.Properties 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | ParaMol.Objective_function.Properties.property 14 | ParaMol.Objective_function.Properties.energy_property 15 | ParaMol.Objective_function.Properties.force_property 16 | ParaMol.Objective_function.Properties.esp_property 17 | ParaMol.Objective_function.Properties.regularization 18 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.cpu_objective_function.rst: -------------------------------------------------------------------------------- 1 | Objective_function.cpu_objective_function module 2 | ========================================================= 3 | 4 | .. automodule:: ParaMol.Objective_function.cpu_objective_function 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.gpu_objective_function.rst: -------------------------------------------------------------------------------- 1 | Objective_function.gpu_objective_function module 2 | ========================================================= 3 | 4 | 5 | .. automodule:: ParaMol.Objective_function.gpu_objective_function 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.objective_function.rst: -------------------------------------------------------------------------------- 1 | Objective_function.objective_function module 2 | ====================================================== 3 | 4 | 5 | .. automodule:: ParaMol.Objective_function.objective_function 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Objective_function.rst: -------------------------------------------------------------------------------- 1 | ParaMol.Objective_function subpackage 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Objective_function 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | 12 | ParaMol.Objective_function.objective_function 13 | ParaMol.Objective_function.cpu_objective_function 14 | ParaMol.Objective_function.gpu_objective_function 15 | ParaMol.Objective_function.Properties 16 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Optimizers.gradient_descent.rst: -------------------------------------------------------------------------------- 1 | Optimizers.gradient_descent module 2 | ========================================== 3 | 4 | 5 | .. automodule:: ParaMol.Optimizers.gradient_descent 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Optimizers.monte_carlo.rst: -------------------------------------------------------------------------------- 1 | Optimizers.monte_carlo module 2 | ====================================== 3 | 4 | 5 | .. automodule:: ParaMol.Optimizers.monte_carlo 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Optimizers.optimizer.rst: -------------------------------------------------------------------------------- 1 | Optimizers.optimizer module 2 | ==================================== 3 | 4 | .. automodule:: ParaMol.Optimizers.optimizer 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Optimizers.rst: -------------------------------------------------------------------------------- 1 | ParaMol.Optimizers subpackage 2 | ============================== 3 | 4 | .. automodule:: ParaMol.Optimizers 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | 12 | ParaMol.Optimizers.optimizer 13 | ParaMol.Optimizers.scipy_optimizers 14 | ParaMol.Optimizers.monte_carlo 15 | ParaMol.Optimizers.simulated_annealing 16 | ParaMol.Optimizers.gradient_descent 17 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Optimizers.scipy_optimizers.rst: -------------------------------------------------------------------------------- 1 | Optimizers.scipy_optimizers module 2 | ==================================== 3 | 4 | .. automodule:: ParaMol.Optimizers.scipy_optimizers 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Optimizers.simulated_annealing.rst: -------------------------------------------------------------------------------- 1 | Optimizers.simulated_annealing module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Optimizers.simulated_annealing 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Parameter_space.parameter_space.rst: -------------------------------------------------------------------------------- 1 | Parameter_space.parameter_space module 2 | ====================================================== 3 | 4 | 5 | .. automodule:: ParaMol.Parameter_space.parameter_space 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Parameter_space.rst: -------------------------------------------------------------------------------- 1 | ParaMol.Parameter_space subpackage 2 | ================================== 3 | 4 | .. automodule:: ParaMol.Parameter_space 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | 11 | .. toctree:: 12 | :titlesonly: 13 | 14 | ParaMol.Parameter_space.parameter_space -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.QM_engines.amber_wrapper.rst: -------------------------------------------------------------------------------- 1 | QM_engines.amber_wrapper module 2 | ====================================================== 3 | 4 | 5 | .. automodule:: ParaMol.QM_engines.amber_wrapper 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.QM_engines.ase_wrapper.rst: -------------------------------------------------------------------------------- 1 | QM_engines.ase_wrapper module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.QM_engines.ase_wrapper 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.QM_engines.dftb_wrapper.rst: -------------------------------------------------------------------------------- 1 | QM_engines.dftb_wrapper module 2 | ====================================================== 3 | 4 | 5 | .. automodule:: ParaMol.QM_engines.dftb_wrapper 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.QM_engines.qm_engine.rst: -------------------------------------------------------------------------------- 1 | QM_engines.qm_engine module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.QM_engines.qm_engine 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.QM_engines.rst: -------------------------------------------------------------------------------- 1 | ParaMol.QM_engines subpackage 2 | ================================== 3 | 4 | .. automodule:: ParaMol.QM_engines 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | ParaMol.QM_engines.qm_engine 14 | ParaMol.QM_engines.amber_wrapper 15 | ParaMol.QM_engines.dftb_wrapper 16 | ParaMol.QM_engines.ase_wrapper -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.System.rst: -------------------------------------------------------------------------------- 1 | ParaMol.System subpackage 2 | ========================= 3 | 4 | .. automodule:: ParaMol.System 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | 11 | .. toctree:: 12 | :titlesonly: 13 | 14 | ParaMol.System.system 15 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.System.system.rst: -------------------------------------------------------------------------------- 1 | ParaMol.System.system module 2 | ====================================================== 3 | 4 | .. automodule:: ParaMol.System.system 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.ab_initio_properties.rst: -------------------------------------------------------------------------------- 1 | Tasks.ab_initio_properties module 2 | =========================================== 3 | 4 | .. automodule:: ParaMol.Tasks.ab_initio_properties 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.adaptive_parametrization.rst: -------------------------------------------------------------------------------- 1 | Tasks.adaptive_parametrization module 2 | ============================================== 3 | 4 | 5 | .. automodule:: ParaMol.Tasks.adaptive_parametrization 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.forces_parallel.rst: -------------------------------------------------------------------------------- 1 | Tasks.forces_parallel module 2 | ===================================== 3 | 4 | 5 | .. automodule:: ParaMol.Tasks.forces_parallel 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.objective_function_plot.rst: -------------------------------------------------------------------------------- 1 | Tasks.objective_function_plot module 2 | ============================================= 3 | 4 | .. automodule:: ParaMol.Tasks.objective_function_plot 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.parametrization.rst: -------------------------------------------------------------------------------- 1 | Tasks.parametrization module 2 | ===================================== 3 | 4 | 5 | .. automodule:: ParaMol.Tasks.parametrization 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.resp_fitting.rst: -------------------------------------------------------------------------------- 1 | Tasks.resp_fitting module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Tasks.resp_fitting 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.rst: -------------------------------------------------------------------------------- 1 | ParaMol.Tasks subpackage 2 | ========================= 3 | 4 | .. automodule:: ParaMol.Tasks 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | ParaMol.Tasks.task 14 | ParaMol.Tasks.parametrization 15 | ParaMol.Tasks.adaptive_parametrization 16 | ParaMol.Tasks.torsions_scan 17 | ParaMol.Tasks.torsions_parametrization 18 | ParaMol.Tasks.resp_fitting 19 | ParaMol.Tasks.ab_initio_properties 20 | ParaMol.Tasks.objective_function_plot 21 | 22 | .. ParaMol.Tasks.forces_parallel 23 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.task.rst: -------------------------------------------------------------------------------- 1 | Tasks.task module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Tasks.task 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.torsions_parametrization.rst: -------------------------------------------------------------------------------- 1 | Tasks.torsions_parametrization module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Tasks.torsions_parametrization 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Tasks.torsions_scan.rst: -------------------------------------------------------------------------------- 1 | Tasks.torsions_scan module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Tasks.torsions_scan 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.Symmetrizers.amber_symmetrizer.rst: -------------------------------------------------------------------------------- 1 | Utils.Symmetrizers.amber_symmetrizer module 2 | ============================================ 3 | 4 | .. automodule:: ParaMol.Utils.Symmetrizers.amber_symmetrizer 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.Symmetrizers.charmm_symmetrizer.rst: -------------------------------------------------------------------------------- 1 | Utils.Symmetrizers.charmm_symmetrizer module 2 | ============================================ 3 | 4 | .. automodule:: ParaMol.Utils.Symmetrizers.charmm_symmetrizer 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.Symmetrizers.gromacs_symmetrizer.rst: -------------------------------------------------------------------------------- 1 | Utils.Symmetrizers.gromacs_symmetrizer module 2 | ============================================ 3 | 4 | .. automodule:: ParaMol.Utils.Symmetrizers.gromacs_symmetrizer 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.Symmetrizers.rst: -------------------------------------------------------------------------------- 1 | Utils.Symmetrizers subsubpackage 2 | =========================================== 3 | 4 | .. automodule:: ParaMol.Utils.Symmetrizers 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | ParaMol.Utils.Symmetrizers.symmetrizer 14 | ParaMol.Utils.Symmetrizers.amber_symmetrizer 15 | ParaMol.Utils.Symmetrizers.gromacs_symmetrizer 16 | ParaMol.Utils.Symmetrizers.charmm_symmetrizer 17 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.Symmetrizers.symmetrizer.rst: -------------------------------------------------------------------------------- 1 | Utils.Symmetrizers.symmetrizer module 2 | ============================================ 3 | 4 | .. automodule:: ParaMol.Utils.Symmetrizers.symmetrizer 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.conformational_sampling.rst: -------------------------------------------------------------------------------- 1 | Utils.conformational_sampling module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Utils.conformational_sampling 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.gaussian_esp.rst: -------------------------------------------------------------------------------- 1 | Utils.gaussian_esp module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Utils.gaussian_esp 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.interface.rst: -------------------------------------------------------------------------------- 1 | Utils.interface module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Utils.interface 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.rst: -------------------------------------------------------------------------------- 1 | ParaMol.Utils subpackage 2 | ================================== 3 | 4 | 5 | .. automodule:: ParaMol.Utils 6 | :members: 7 | :undoc-members: 8 | :show-inheritance: 9 | 10 | .. toctree:: 11 | :titlesonly: 12 | 13 | ParaMol.Utils.settings 14 | ParaMol.Utils.interface 15 | ParaMol.Utils.gaussian_esp 16 | ParaMol.Utils.conformational_sampling 17 | ParaMol.Utils.Symmetrizers 18 | 19 | -------------------------------------------------------------------------------- /docs/source/ParaMol_Package/ParaMol.Utils.settings.rst: -------------------------------------------------------------------------------- 1 | Utils.settings module 2 | ===================================== 3 | 4 | .. automodule:: ParaMol.Utils.settings 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /docs/source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | import os 14 | import sys 15 | 16 | # Path to ParaMol 17 | sys.path.insert(0, os.path.abspath('./../../')) 18 | 19 | # -- Project information ----------------------------------------------------- 20 | project = 'ParaMol' 21 | copyright = '2020, João Morado' 22 | author = 'João Morado' 23 | 24 | # Version and release 25 | version = '1.1.4' 26 | release = '1.1.4' 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.autosectionlabel','sphinx.ext.autosummary',] 32 | 33 | # Adding these lines toa avoid WARNING: missing attribute mentioned in :members: or __all__: 34 | autodoc_default_flags = ['members'] 35 | autosummary_generate = True 36 | 37 | # Napoleon configuration 38 | napoleon_google_docstring = True 39 | napoleon_numpy_docstring = True 40 | napoleon_include_init_with_doc = False 41 | napoleon_include_private_with_doc = True 42 | napoleon_include_special_with_doc = False 43 | napoleon_use_admonition_for_examples = False 44 | napoleon_use_admonition_for_notes = False 45 | napoleon_use_admonition_for_references = False 46 | napoleon_use_ivar = True 47 | napoleon_use_param = True 48 | napoleon_use_rtype = False 49 | 50 | # Add any paths that contain templates here, relative to this directory. 51 | templates_path = ['_templates'] 52 | 53 | # List of patterns, relative to source directory, that match files and 54 | # directories to ignore when looking for source files. 55 | # This pattern also affects html_static_path and html_extra_path. 56 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 57 | 58 | # -- Options for HTML output ------------------------------------------------- 59 | html_theme = 'sphinx_rtd_theme' 60 | 61 | # Add any paths that contain custom static files (such as style sheets) here, 62 | # relative to this directory. They are copied after the builtin static files, 63 | # so a file named "default.css" will overwrite the builtin "default.css". 64 | html_static_path = ['_static'] -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | .. ParaMol documentation master file, created by 2 | sphinx-quickstart on Wed Jan 8 10:29:58 2020. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 7 | 8 | 9 | .. image:: paramol.png 10 | 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | :caption: Contents: 15 | 16 | About 17 | Installation 18 | ParaMol 19 | Examples 20 | ParaMol_settings 21 | Files_specification 22 | Change_log 23 | 24 | 25 | Indices and tables 26 | ================== 27 | 28 | * :ref:`genindex` 29 | * :ref:`modindex` 30 | * :ref:`search` 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/source/paramol-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/paramol-white.png -------------------------------------------------------------------------------- /docs/source/paramol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/paramol.png -------------------------------------------------------------------------------- /docs/source/paramol_old.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JMorado/ParaMol/96e81e7c93cfb35fb8642316596784a2bd4df349/docs/source/paramol_old.jpg -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | setup( 3 | name='ParaMol', 4 | version='1.1.4', 5 | packages=find_packages(), 6 | url='https://github.com/JMorado/ParaMol', 7 | license='MIT', 8 | author='João Morado', 9 | author_email='j.morado@soton.ac.uk', 10 | description='A Package for Parametrization of Molecular Mechanics Force Fields', 11 | tests_require=["pytest"], 12 | test_suite="ParaMol.Tests", 13 | ) 14 | --------------------------------------------------------------------------------