Skip to content

Commit

Permalink
Merge pull request #145 from rigdenlab/fix_more_tests
Browse files Browse the repository at this point in the history
Fix more tests
  • Loading branch information
hlasimpk authored Aug 20, 2024
2 parents 78104cb + e0c61f9 commit 460c0e9
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sequence Independent Molecular Replacement Based on Available Database
:target: https://travis-ci.com/rigdenlab/SIMBAD
:alt: CI Status

.. image:: https://img.shields.io/badge/solution%20count-8-blue.svg?style=flat
.. image:: https://img.shields.io/badge/solution%20count-12-blue.svg?style=flat
:alt: Solution count

.. image:: https://img.shields.io/badge/DOI-10.1107/S2059798318005752-blue.svg
Expand Down
2 changes: 1 addition & 1 deletion bin/simbad-contaminant.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@ccp4-python %CCP4%\Lib\site-packages\simbad\command_line\simbad_contaminant.py %*
@ccp4-python %CCP4%\Python39\Lib\site-packages\simbad\command_line\simbad_contaminant.py %*
2 changes: 1 addition & 1 deletion bin/simbad-database.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@ccp4-python %CCP4%\Lib\site-packages\simbad\command_line\simbad_database.py %*
@ccp4-python %CCP4%\Python39\Lib\site-packages\simbad\command_line\simbad_database.py %*
2 changes: 1 addition & 1 deletion bin/simbad-full.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@ccp4-python %CCP4%\Lib\site-packages\simbad\command_line\simbad_full.py %*
@ccp4-python %CCP4%\Python39\Lib\site-packages\simbad\command_line\simbad_full.py %*
2 changes: 1 addition & 1 deletion bin/simbad-lattice.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@ccp4-python %CCP4%\Lib\site-packages\simbad\command_line\simbad_lattice.py %*
@ccp4-python %CCP4%\Python39\Lib\site-packages\simbad\command_line\simbad_lattice.py %*
2 changes: 1 addition & 1 deletion bin/simbad-morda.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@ccp4-python %CCP4%\Lib\site-packages\simbad\command_line\simbad_morda.py %*
@ccp4-python %CCP4%\Python39\Lib\site-packages\simbad\command_line\simbad_morda.py %*
2 changes: 1 addition & 1 deletion bin/simbad.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@ccp4-python %CCP4%\Lib\site-packages\simbad\command_line\simbad_main.py %*
@ccp4-python %CCP4%\Python39\Lib\site-packages\simbad\command_line\simbad_main.py %*
2 changes: 1 addition & 1 deletion scripts/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import requests

LOG = logging.getLogger(__name__)
URL = 'https://search.rcsb.org/rcsbsearch/v1/query?json={"query":{"type":"terminal","service":"full_text","parameters":{"value":"simbad"}},"return_type":"entry"}'
URL = 'https://search.rcsb.org/rcsbsearch/v2/query?json={"query":{"type":"terminal","service":"full_text","parameters":{"value":"simbad"}},"return_type":"entry"}'


def update_readme(n_sols):
Expand Down
6 changes: 6 additions & 0 deletions simbad/mr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,16 +563,22 @@ def summarize(self, csv_file):

def _mr_job_succeeded(r_fact, r_free):
"""Check values for job success"""
if r_fact is None or r_free is None:
return False
return r_fact < 0.45 and r_free < 0.45


def _refinement_succeeded(r_fact, r_free):
"""Check values for job success"""
if r_fact is None or r_free is None:
return False
return r_fact < 0.45 and r_free < 0.45


def _phaser_succeeded(llg, tfz):
"""Check values for job success"""
if llg is None or tfz is None:
return False
return llg > 120 and tfz > 8


Expand Down
10 changes: 5 additions & 5 deletions simbad/parsers/phaser_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
class PhaserParser(simbad.parsers._Parser):
def __init__(self, logfile):
super(PhaserParser, self).__init__(logfile)
self.llg = None
self.tfz = None
self.rfz = None
self.llg = 0
self.tfz = 0
self.rfz = 0
self.parse()

def parse(self):
Expand All @@ -22,10 +22,10 @@ def parse(self):
llist = line.split()
llist.reverse()
for i in llist:
if "TFZ==" in i and "*" not in i:
if all(x not in i for x in ['*', '(', ')']) and "TFZ==" in i:
self.tfz = float(i.replace("TFZ==", ""))
break
if "TFZ=" in i and "TFZ==" not in i and "*" not in i:
if all(x not in i for x in ['*', '(', ')', 'TFZ==']) and "TFZ=" in i:
self.tfz = float(i.replace("TFZ=", ""))
break

Expand Down

0 comments on commit 460c0e9

Please sign in to comment.