diff --git a/rabdam/Subroutines/PDBCUR.py b/rabdam/Subroutines/PDBCUR.py index 20bbfef..4290275 100644 --- a/rabdam/Subroutines/PDBCUR.py +++ b/rabdam/Subroutines/PDBCUR.py @@ -576,7 +576,7 @@ def clean_atom_rec(atoms_list, disulfide_bonds, seqres, cryst1_line, and atm.insCode == inscode1 and atm.resiType == 'CYS') or (atm.chainID == chain2 and atm.resiNum == resnum2 - and atm.insCode == inscode2 and atom.resiType == 'CYS')) + and atm.insCode == inscode2 and atm.resiType == 'CYS')) ): pause = True print('\n\nERROR: One or more disulfide bonds has been ' diff --git a/rabdam/Subroutines/output.py b/rabdam/Subroutines/output.py index 53fc88d..4efc7d3 100644 --- a/rabdam/Subroutines/output.py +++ b/rabdam/Subroutines/output.py @@ -322,7 +322,7 @@ def plot_Bnet_histogram(self, bnet_df, median, prot_or_na): plt.ylabel('Normalised Frequency') plt.title(self.pdb_code + ' Bnet kernel density plot') - # Extracts an array of 128 (x, y) coordinate pairs evenly spaced + # Extracts an array of 100 (x, y) coordinate pairs evenly spaced # along the x(BDamage)-axis from the kernel density plot. These # coordinate pairs are used to calculate, via the trapezium rule, # the area under the curve between the smallest value of x and the diff --git a/rabdam/rabdam.py b/rabdam/rabdam.py index f83c42a..8c3655b 100644 --- a/rabdam/rabdam.py +++ b/rabdam/rabdam.py @@ -46,10 +46,13 @@ def parse_command_line_arguments(command_line, test=False): else: from rabdam.Subroutines.checkDependencies import check_RABDAM_dependencies else: - if __name__ == '__main__' or 'CCP4' in list(os.environ.keys()): + if __name__ == '__main__': from Subroutines.checkDependencies import check_RABDAM_dependencies else: - from rabdam.Subroutines.checkDependencies import check_RABDAM_dependencies + if sys.version_info[0] < 3: + from Subroutines.checkDependencies import check_RABDAM_dependencies + else: + from rabdam.Subroutines.checkDependencies import check_RABDAM_dependencies # Reads in command line inputs. There are three recognised flags: -i, -f # and -o. Program inputs are specified by either the -i or the -f flag; @@ -466,10 +469,13 @@ def main(test=False): import time import numpy as np - if __name__ == '__main__' or 'CCP4' in list(os.environ.keys()): + if __name__ == '__main__': from Subroutines.CalculateBDamage import rabdam else: - from rabdam.Subroutines.CalculateBDamage import rabdam + if sys.version_info[0] < 3: + from Subroutines.CalculateBDamage import rabdam + else: + from rabdam.Subroutines.CalculateBDamage import rabdam # Parses in command line arguments args = parse_command_line_arguments(sys.argv[1:]) diff --git a/setup.py b/setup.py index d387d0f..8519bff 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages -with open('README.md', 'r') as f: +with open('README.md', 'r', encoding='utf-8') as f: long_description = f.read() setup(