Skip to content

Commit

Permalink
Renamed tool to be more consistent with its function
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoRodrigues committed Nov 27, 2018
1 parent 8f4f0f1 commit 349bdef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions bin/pdb_delaltloc.py → bin/pdb_selaltloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
location using an option.
Usage:
python pdb_selocc.py [-<option>] <pdb file>
python pdb_selaltloc.py [-<option>] <pdb file>
Example:
python pdb_selocc.py 1CTF.pdb # picks locations with highest occupancy
python pdb_selocc.py -A 1CTF.pdb # picks alternate locations labelled 'A'
python pdb_selaltloc.py 1CTF.pdb # picks locations with highest occupancy
python pdb_selaltloc.py -A 1CTF.pdb # picks alternate locations labelled 'A'
This program is part of the `pdb-tools` suite of utilities and should not be
distributed isolatedly. The `pdb-tools` were created to quickly manipulate PDB
Expand Down
20 changes: 10 additions & 10 deletions tests/test_pdb_delaltloc.py → tests/test_pdb_selaltloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.

"""
Unit Tests for `pdb_delaltloc`.
Unit Tests for `pdb_selaltloc`.
"""

import os
Expand All @@ -34,7 +34,7 @@ class TestTool(unittest.TestCase):

def setUp(self):
# Dynamically import the module
name = 'bin.pdb_delaltloc'
name = 'bin.pdb_selaltloc'
self.module = __import__(name, fromlist=[''])

def exec_module(self):
Expand All @@ -54,10 +54,10 @@ def exec_module(self):
return

def test_default(self):
"""$ pdb_delaltloc data/dummy.pdb"""
"""$ pdb_selaltloc data/dummy.pdb"""

# Simulate input
# pdb_delaltloc dummy.pdb
# pdb_selaltloc dummy.pdb
sys.argv = ['', os.path.join(data_dir, 'dummy.pdb')]

# Execute the script
Expand All @@ -75,7 +75,7 @@ def test_default(self):
self.assertEqual(atoms[' CA ASN A 1'], 0.60) # picked highest occ.

def test_select_occupancy(self):
"""$ pdb_delaltloc -A data/dummy.pdb"""
"""$ pdb_selaltloc -A data/dummy.pdb"""

sys.argv = ['', '-A', os.path.join(data_dir, 'dummy.pdb')]

Expand All @@ -92,7 +92,7 @@ def test_select_occupancy(self):
self.assertEqual(atoms[' CA ASN A 1'], 0.40)

def test_file_not_found(self):
"""$ pdb_delaltloc not_existing.pdb"""
"""$ pdb_selaltloc not_existing.pdb"""

afile = os.path.join(data_dir, 'not_existing.pdb')
sys.argv = ['', afile]
Expand All @@ -105,7 +105,7 @@ def test_file_not_found(self):
"ERROR!! File not found") # proper error message

def test_file_missing(self):
"""$ pdb_delaltloc -A"""
"""$ pdb_selaltloc -A"""

sys.argv = ['', '-A']

Expand All @@ -117,7 +117,7 @@ def test_file_missing(self):
"ERROR!! No data to process!")

def test_helptext(self):
"""$ pdb_delaltloc"""
"""$ pdb_selaltloc"""

sys.argv = ['']

Expand All @@ -128,7 +128,7 @@ def test_helptext(self):
self.assertEqual(self.stderr, self.module.__doc__.split("\n")[:-1])

def test_invalid_option(self):
"""$ pdb_delaltloc -AH data/dummy.pdb"""
"""$ pdb_selaltloc -AH data/dummy.pdb"""

sys.argv = ['', '-AH', os.path.join(data_dir, 'dummy.pdb')]

Expand All @@ -140,7 +140,7 @@ def test_invalid_option(self):
"ERROR!! Alternate location identifiers must be ")

def test_not_an_option(self):
"""$ pdb_delaltloc 20 data/dummy.pdb"""
"""$ pdb_selaltloc 20 data/dummy.pdb"""

sys.argv = ['', '20', os.path.join(data_dir, 'dummy.pdb')]

Expand Down

0 comments on commit 349bdef

Please sign in to comment.