Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
python3 setup.py sdist bdist_wheel
- name: Upload artifacts for inspection
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ at [Scripps Research](https://www.scripps.edu/).
### Documentation
In-depth documentation can be found on [ReadTheDocs](https://ringtail.readthedocs.io).

### Version 2.1.1 bug fixes
- bugs related to ligand filtering and certain uses of the `overwrite` option in the command line have been fixed
- enhancements to the result plotting feature

### New in version 2.0.0 and 2.1.0

- changes in keywords used for the command line tool
Expand Down
2 changes: 1 addition & 1 deletion ringtail/outputmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def plot_single_points(

def save_scatterplot(self):
"""
Saves current figure as scatter.png
Saves and closes current figure as scatter.png

Raises:
OutputError
Expand Down
19 changes: 13 additions & 6 deletions ringtail/ringtailcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,9 @@ def write_flexres_pdb(
self.storageman.fetch_single_ligand_output_info(ligname)
)
flexible_residues, flexres_atomnames = self.storageman.fetch_flexres_info()
if flexible_residues != []: # converts string to list
if flexible_residues is None:
flexible_residues, flexres_atomnames = [], []
elif flexible_residues != []: # converts string to list
flexible_residues = json.loads(flexible_residues)
flexres_atomnames = json.loads(flexres_atomnames)

Expand Down Expand Up @@ -1532,7 +1534,7 @@ def write_flexres_pdb(
with open(path, "w") as file:
file.write(pdb_str)

return ligand_mol, flexmoldict
return ligand_mol, flexmoldict

def write_molecule_sdfs(
self,
Expand Down Expand Up @@ -1665,7 +1667,9 @@ def ligands_rdkit_mol(self, bookmark_name=None, write_nonpassing=False) -> dict:
passing_molecule_info = self.storageman.fetch_passing_ligand_output_info()
flexible_residues, flexres_atomnames = self.storageman.fetch_flexres_info()

if flexible_residues != []:
if flexible_residues is None:
flexible_residues, flexres_atomnames = [], []
elif flexible_residues != []:
flexible_residues = json.loads(flexible_residues)
flexres_atomnames = json.loads(flexres_atomnames)

Expand Down Expand Up @@ -1732,9 +1736,10 @@ def plot(
"""
Get data needed for creating Ligand Efficiency vs
Energy scatter plot from storageManager. Call OutputManager to create plot.
Option to save the plot and close it immediately, or keep it open and save it manually later.

Args:
save (bool): whether to save plot to cd
save (bool): whether to save plot to cd. Will save and close figure
bookmark_name (str): bookmark from which to fetch filtered data to plot
return_fig_handle (bool): use to return a handle to the matplotlib figure instead of saving or showing figure

Expand Down Expand Up @@ -1775,7 +1780,7 @@ def plot(
markersize = 20
# for smaller dataset, scale num of bins and markersize to size of dataset
else:
num_of_bins = round(datalength / 10)
num_of_bins = max(1, round(datalength / 10))
markersize = 60 - (datalength / 25)

# plot the data
Expand Down Expand Up @@ -1879,7 +1884,9 @@ def onpick(event):
flexible_residues, flexres_atomnames = (
self.storageman.fetch_flexres_info()
)
if flexible_residues != []: # converts string to list
if flexible_residues is None:
flexible_residues, flexres_atomnames = [], []
elif flexible_residues != []: # converts string to list
flexible_residues = json.loads(flexible_residues)
flexres_atomnames = json.loads(flexres_atomnames)

Expand Down
4 changes: 2 additions & 2 deletions ringtail/storagemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class StorageManager:
_db_schema_code_compatibility = {
"1.0.0": ["1.0.0"],
"1.1.0": ["1.1.0"],
"2.0.0": ["2.0.0", "2.1.0"],
"2.0.0": ["2.0.0", "2.1.0", "2.1.1"],
}

"""Base class for a generic virtual screening database object.
Expand Down Expand Up @@ -1622,7 +1622,7 @@ def fetch_filters_from_bookmark(self, bookmark_name: str | None = None):
)

filters = self._run_query(sql_query).fetchone()
if not filters:
if not filters:
return {}

return json.loads(filters[0])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def find_files(directory):

setup(
name="ringtail",
version="2.1.0",
version="2.1.1",
author="Forli Lab",
author_email="forli@scripps.edu",
url="https://github.com/forlilab/Ringtail",
Expand Down