Skip to content

Commit

Permalink
Completely removed python version restrictions.
Browse files Browse the repository at this point in the history
  • Loading branch information
nbruciaferri committed May 15, 2024
1 parent 2e04017 commit 6295ae2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![License: LGPL v2.1](https://img.shields.io/badge/License-LGPL_v2.1-green.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) [![PyPI - Version](https://img.shields.io/pypi/v/cosolvkit)](https://pypi.org/project/cosolvkit/0.4.5/) [![Powered by RDKit](https://img.shields.io/badge/Powered%20by-RDKit-3838ff.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXc3NwUFP8UPP9kZP+MjP+0tP////9ZXZotAAAAAXRSTlMAQObYZgAAAAFiS0dEBmFmuH0AAAAHdElNRQfmAwsPGi+MyC9RAAAAQElEQVQI12NgQABGQUEBMENISUkRLKBsbGwEEhIyBgJFsICLC0iIUdnExcUZwnANQWfApKCK4doRBsKtQFgKAQC5Ww1JEHSEkAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xMVQxNToyNjo0NyswMDowMDzr2J4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTFUMTU6MjY6NDcrMDA6MDBNtmAiAAAAAElFTkSuQmCC)](https://www.rdkit.org/)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![License: LGPL v2.1](https://img.shields.io/badge/License-LGPL_v2.1-green.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) [![PyPI - Version](https://img.shields.io/pypi/v/cosolvkit)](https://pypi.org/project/cosolvkit/0.4.6/) [![Powered by RDKit](https://img.shields.io/badge/Powered%20by-RDKit-3838ff.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXc3NwUFP8UPP9kZP+MjP+0tP////9ZXZotAAAAAXRSTlMAQObYZgAAAAFiS0dEBmFmuH0AAAAHdElNRQfmAwsPGi+MyC9RAAAAQElEQVQI12NgQABGQUEBMENISUkRLKBsbGwEEhIyBgJFsICLC0iIUdnExcUZwnANQWfApKCK4doRBsKtQFgKAQC5Ww1JEHSEkAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xMVQxNToyNjo0NyswMDowMDzr2J4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTFUMTU6MjY6NDcrMDA6MDBNtmAiAAAAAElFTkSuQmCC)](https://www.rdkit.org/)
[![Documentation Status](https://readthedocs.org/projects/cosolvkit/badge/?version=latest)](https://cosolvkit.readthedocs.io/en/latest/?badge=latest)


Expand Down
12 changes: 6 additions & 6 deletions cosolvkit/cosolvent_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import io
from collections import defaultdict
from typing import Union
from typing import Union, Tuple
import numpy as np
from scipy import spatial
from scipy.stats import qmc
Expand Down Expand Up @@ -635,7 +635,7 @@ def _create_system(self, forcefield: app.forcefield, topology: app.Topology) ->
#region FillTheVoid
def add_cosolvents(self,
cosolvents: dict,
vectors: tuple[Vec3, Vec3, Vec3],
vectors: Tuple[Vec3, Vec3, Vec3],
lowerBound: Union[openmmunit.Quantity, Vec3],
upperBound: Union[openmmunit.Quantity, Vec3],
receptor_positions: list) -> dict:
Expand All @@ -647,7 +647,7 @@ def add_cosolvents(self,
:param cosolvents: keys are cosolvent molecules and values are 3D coordinates of the molecule
:type cosolvents: dict
:param vectors: vectors defining the simulation box
:type vectors: tuple[openmm.Vec3, openmm.Vec3, openmm.Vec3]
:type vectors: Tuple[openmm.Vec3, openmm.Vec3, openmm.Vec3]
:param lowerBound: lower bound of the simulation box
:type lowerBound: Union[openmm.unit.Quantity, Vec3]
:param upperBound: upper bound of the simulation box
Expand Down Expand Up @@ -761,7 +761,7 @@ def accept_reject(self,
valid_ids: list,
lowerBound: Union[openmmunit.Quantity, Vec3],
upperBound: Union[openmmunit.Quantity, Vec3],
protein_kdtree: spatial.cKDTree) -> tuple[np.ndarray, list]:
protein_kdtree: spatial.cKDTree) -> Tuple[np.ndarray, list]:
"""Accepts or reject the halton move. A random halton point is selected and checked, if accepted
the cosolvent is placed there, otherwise a local search is performed in the neighbors of the point
(1 tile). If the local search produces no clashes the new position is accepted, otherwise a new
Expand All @@ -783,7 +783,7 @@ def accept_reject(self,
:param protein_kdtree: tree of the protein's positions
:type protein_kdtree: spatial.cKDTree
:return: accepted coordinates for the cosolvent and the used halton ids
:rtype: tuple[np.ndarray, list]
:rtype: Tuple[np.ndarray, list]
"""
trial = 0
accepted = False
Expand Down Expand Up @@ -1005,7 +1005,7 @@ def _parametrize_cosolvents(self, cosolvents: dict, small_molecule_ff="espaloma"
def _build_box(self,
positions: np.ndarray,
padding: openmmunit.Quantity,
radius: openmmunit.Quantity = None) -> tuple[tuple[Vec3, Vec3, Vec3],
radius: openmmunit.Quantity = None) -> Tuple[Tuple[Vec3, Vec3, Vec3],
Vec3,
Union[openmmunit.Quantity, Vec3],
Union[openmmunit.Quantity, Vec3]]:
Expand Down
5 changes: 3 additions & 2 deletions cosolvkit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import shutil
import subprocess
import importlib
from typing import List, Tuple
from collections import defaultdict

import numpy as np
Expand Down Expand Up @@ -89,7 +90,7 @@ class MutuallyExclusiveParametersError(Exception):

# simulation.context.setParameter('k', k)

def fix_pdb(pdbfile: str, pdbxfile: str, keep_heterogens: bool=False) -> tuple[Topology, list]:
def fix_pdb(pdbfile: str, pdbxfile: str, keep_heterogens: bool=False) -> Tuple[Topology, List]:
"""Fixes common problems in PDB such as:
- missing atoms
- missing residues
Expand Down Expand Up @@ -123,7 +124,7 @@ def fix_pdb(pdbfile: str, pdbxfile: str, keep_heterogens: bool=False) -> tuple[T
fixer.addMissingHydrogens(7)
return fixer.topology, fixer.positions

def add_variants(topology: Topology, positions: list, variants: list=list()) -> tuple[Topology, list]:
def add_variants(topology: Topology, positions: list, variants: list=list()) -> Tuple[Topology, List]:
"""Adds variants for specific protonation states.
:param topology: openmm topology
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def find_files(directory):


setup(name="cosolvkit",
version='0.4.5',
version='0.4.6',
description="CosolvKit",
author="Niccolo Bruciaferri, Jerome Eberhardt",
author_email="[email protected]",
Expand All @@ -28,7 +28,6 @@ def find_files(directory):
data_files=[("", ["README.md", "LICENSE"])],
include_package_data=True,
zip_safe=False,
python_requires=">=3.9",
license="LGPL-2.1",
keywords=["molecular modeling", "drug design",
"cosolvent", "MD simulations"],
Expand Down

0 comments on commit 6295ae2

Please sign in to comment.