diff --git a/.gitignore b/.gitignore index 398bcbe..72d7fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ *.py[cod] # PIP stuff *.egg-info +# Visual studio code +.vscode \ No newline at end of file diff --git a/propka.cfg b/propka.cfg deleted file mode 100644 index a12e38a..0000000 --- a/propka.cfg +++ /dev/null @@ -1,398 +0,0 @@ -# PropKa configuration file - -version version_A - -# Model pKa values -model_pkas C- 3.20 -model_pkas ASP 3.80 -model_pkas GLU 4.50 -model_pkas HIS 6.50 -model_pkas CYS 9.00 -model_pkas TYR 10.00 -model_pkas LYS 10.50 -model_pkas ARG 12.50 -#model_pkas SER 14.20 Jack Kyte: Structure in Protein Chemistry, 1995, Garland Publishing, Inc New York and London -model_pkas N+ 8.00 -model_pkas CG 11.50 -model_pkas C2N 11.50 -model_pkas N30 10.00 -model_pkas N31 10.00 -model_pkas N32 10.00 -model_pkas N33 10.00 -model_pkas NAR 5.00 -model_pkas OCO 4.50 -model_pkas SH 10.00 -model_pkas OP 6.00 - -# Custom ligand pKa values -# P. Acharya, P. Cheruku, S. Chatterjee, S. Acharya, and, J. Chattopadhyaya: -# Measurement of Nucleobase pKa Values in Model Mononucleotides -# Shows RNA-RNA Duplexes To Be More Stable than DNA-DNA Duplexes -# Journal of the American Chemical Society 2004 126 (9), 2862-2869 -# -custom_model_pkas DA-N1 3.82 -custom_model_pkas DA-N3 3.82 -custom_model_pkas DA-N7 3.82 -custom_model_pkas DA-OP1 1.00 -custom_model_pkas DA-OP2 1.00 - -custom_model_pkas DG-N1 9.59 -custom_model_pkas DG-N3 9.59 -custom_model_pkas DG-N7 9.59 -custom_model_pkas DG-OP1 1.00 -custom_model_pkas DG-OP2 1.00 - -custom_model_pkas DC-N3 4.34 -custom_model_pkas DC-OP1 1.00 -custom_model_pkas DC-OP2 1.00 - -custom_model_pkas DT-N3 10.12 -custom_model_pkas DT-OP1 1.00 -custom_model_pkas DT-OP2 1.00 - - -# protein group mapping -protein_group_mapping ASP-CG COO -protein_group_mapping GLU-CD COO -protein_group_mapping HIS-CG HIS -protein_group_mapping CYS-SG CYS -protein_group_mapping TYR-OH TYR -protein_group_mapping LYS-NZ LYS -protein_group_mapping ARG-CZ ARG -#protein_group_mapping SER-OG SER -protein_group_mapping THR-OG1 ROH -protein_group_mapping SER-OG ROH# -protein_group_mapping ASN-CG AMD -protein_group_mapping GLN-CD AMD -protein_group_mapping TRP-NE1 TRP - - -# matrix for propka interactions -# 'N' non-iterative interaction -# 'I' iterative interaction -# '-' no interaction - #CYS -interaction_matrix CYS I#N+ -interaction_matrix N+ N I#HIS -interaction_matrix HIS I N I#LYS -interaction_matrix LYS N N N I#AMD -interaction_matrix AMD N - N - -#COO -interaction_matrix COO I N I N N I#ARG -interaction_matrix ARG N N N N - N I#TRP -interaction_matrix TRP N - - - - N - -#ROH -interaction_matrix ROH N - - - - N - - -#TYR -interaction_matrix TYR N I I I N N N N N I#SER -interaction_matrix SER N N N N N N I N N N I #CG -interaction_matrix CG N N N N - N I - - N I I#C2N -interaction_matrix C2N N N N N - N I - - N I I I#N30 -interaction_matrix N30 N I N N - N N - - I N I I I#N31 -interaction_matrix N31 N I N N - N N - - I N I I I I#N32 -interaction_matrix N32 N I N N - N N - - I N I I I I I#N33 -interaction_matrix N33 N I N N - N N - - I N I I I I I I#NAR -interaction_matrix NAR I N I I N I N - - I N N N N N N N I#OCO -interaction_matrix OCO I N I N N I N N N N N N N N N N N I I#NP1 -interaction_matrix NP1 N - N - - N - - - N N - - - - - - N N -#OH -interaction_matrix OH N - - - - N - - - N N - - - - - - - N - -#O3 -interaction_matrix O3 N - N - - N - - - N N - - - - - - N N - - -#CL -interaction_matrix CL N - N - - N - - - N N - - - - - - N N - - - -#F -interaction_matrix F N - N - - N - - - N N - - - - - - N N - - - - -#NAM -interaction_matrix NAM N - N - - N - - - N N - - - - - - N N - - - - - -#N1 -interaction_matrix N1 N - N - - N - - - N N - - - - - - N N - - - - - - -#O2 -interaction_matrix O2 N - N - - N - - - N N - - - - - - N N - - - - - - - -#OP -interaction_matrix OP I N I N N I N N N N N N N N N N N I I N N N N N N N N I#SH -interaction_matrix SH I N N N N N N N N N N I I I I I I N N N N N N N N N N N I - -# Cutoff values for side chain interactions -# default value -sidechain_cutoffs default 3.0 4.0 -# COO -sidechain_cutoffs COO COO 2.5 3.5 -Sidechain_cutoffs COO SER 2.65 3.65 -sidechain_cutoffs COO ARG 1.85 2.85 -sidechain_cutoffs COO LYS 2.85 3.85 -sidechain_cutoffs COO HIS 2.0 3.0 -sidechain_cutoffs COO AMD 2.0 3.0 -sidechain_cutoffs COO TRP 2.0 3.0 -sidechain_cutoffs COO ROH 2.65 3.65 -sidechain_cutoffs COO TYR 2.65 3.65 -sidechain_cutoffs COO N+ 2.85 3.85 -sidechain_cutoffs COO CG 1.85 2.85 -sidechain_cutoffs COO C2N 1.85 2.85 -sidechain_cutoffs COO N30 2.85 3.85 -sidechain_cutoffs COO N31 2.85 3.85 -sidechain_cutoffs COO N32 2.85 3.85 -sidechain_cutoffs COO N33 2.85 3.85 -sidechain_cutoffs COO NAR 2.0 3.0 -sidechain_cutoffs COO OCO 2.5 3.5 -sidechain_cutoffs COO OH 2.65 3.65 -sidechain_cutoffs COO NAM 2.0 3.0 -# SER -sidechain_cutoffs SER SER 3.5 4.5 -sidechain_cutoffs SER ARG 2.5 4.0 -sidechain_cutoffs SER HIS 2.0 3.0 -sidechain_cutoffs SER AMD 2.5 3.5 -sidechain_cutoffs SER CYS 3.5 4.5 -sidechain_cutoffs SER TRP 2.5 3.5 -sidechain_cutoffs SER ROH 3.5 4.5 -sidechain_cutoffs SER CG 2.5 4.0 -sidechain_cutoffs SER C2N 2.5 4.0 -sidechain_cutoffs SER NAR 2.0 3.0 -sidechain_cutoffs SER OH 3.5 4.5 -sidechain_cutoffs SER SH 3.5 4.5 -sidechain_cutoffs SER TYR 3.5 4.5 -sidechain_cutoffs SER N+ 3.0 4.5 -sidechain_cutoffs SER NAM 2.5 3.5 -# ARG -sidechain_cutoffs ARG CYS 2.5 4.0 -sidechain_cutoffs ARG TYR 2.5 4.0 -sidechain_cutoffs ARG OCO 1.85 2.85 -sidechain_cutoffs ARG SH 2.5 4.0 -# HIS -sidechain_cutoffs HIS AMD 2.0 3.0 -sidechain_cutoffs HIS TYR 2.0 3.0 -sidechain_cutoffs HIS OCO 2.0 3.0 -# CYS -sidechain_cutoffs CYS CYS 3.0 5.0 -sidechain_cutoffs CYS TRP 2.5 3.5 -sidechain_cutoffs CYS ROH 3.5 4.5 -sidechain_cutoffs CYS AMD 2.5 3.5 -sidechain_cutoffs CYS TYR 3.5 4.5 -sidechain_cutoffs CYS N+ 3.0 4.5 -sidechain_cutoffs CYS CG 2.5 4.0 -sidechain_cutoffs CYS C2N 2.5 4.0 -sidechain_cutoffs CYS N30 3.0 4.5 -sidechain_cutoffs CYS N31 3.0 4.5 -sidechain_cutoffs CYS N32 3.0 4.5 -sidechain_cutoffs CYS N33 3.0 4.5 -sidechain_cutoffs CYS OH 3.5 4.5 -sidechain_cutoffs CYS NAM 2.5 3.5 -sidechain_cutoffs CYS SH 3.0 5.0 -# TYR -sidechain_cutoffs TYR TYR 3.5 4.5 -sidechain_cutoffs TYR N+ 3.0 4.5 -sidechain_cutoffs TYR AMD 2.5 3.5 -sidechain_cutoffs TYR TRP 2.5 3.5 -sidechain_cutoffs TYR ROH 3.5 4.5 -sidechain_cutoffs TYR CG 2.5 4.0 -sidechain_cutoffs TYR C2N 2.5 4.0 -sidechain_cutoffs TYR OCO 2.65 3.65 -sidechain_cutoffs TYR NAR 2.0 3.0 -sidechain_cutoffs TYR OH 3.5 4.5 -sidechain_cutoffs TYR NAM 2.5 3.5 -sidechain_cutoffs TYR SH 3.5 4.5 -# N+ -sidechain_cutoffs N+ OCO 2.85 3.85 -sidechain_cutoffs N+ SH 3.0 4.5 -# LYS -sidechain_cutoffs LYS OCO 2.85 3.85 -# OCO -sidechain_cutoffs OCO OCO 2.5 3.5 -sidechain_cutoffs OCO TRP 2.0 3.0 -sidechain_cutoffs OCO ROH 2.65 3.65 -sidechain_cutoffs OCO AMD 2.0 3.0 -sidechain_cutoffs OCO CG 1.85 2.85 -sidechain_cutoffs OCO C2N 1.85 2.85 -sidechain_cutoffs OCO N30 2.85 3.85 -sidechain_cutoffs OCO N31 2.85 3.85 -sidechain_cutoffs OCO N32 2.85 3.85 -sidechain_cutoffs OCO N33 2.85 3.85 -sidechain_cutoffs OCO NAR 2.0 3.0 -sidechain_cutoffs OCO OH 2.65 3.65 -sidechain_cutoffs OCO NAM 2.0 3.0 -# NAR -sidechain_cutoffs NAR AMD 2.0 3.0 -# SH -sidechain_cutoffs SH ROH 3.5 4.5 -sidechain_cutoffs SH TRP 2.5 3.5 -sidechain_cutoffs SH AMD 2.5 3.5 -sidechain_cutoffs SH NAM 2.5 3.5 -sidechain_cutoffs SH CG 2.5 4.0 -sidechain_cutoffs SH C2N 2.5 4.0 -sidechain_cutoffs SH OH 3.5 4.5 -sidechain_cutoffs SH SH 3.0 5.0 - - - -# Maximal interaction energies for side chains -sidechain_interaction 0.85 - -# Angular dependent sidechain interactions -angular_dependent_sidechain_interactions HIS -angular_dependent_sidechain_interactions ARG -angular_dependent_sidechain_interactions AMD -angular_dependent_sidechain_interactions TRP - -# exception interaction values -COO_HIS_exception 1.60 -OCO_HIS_exception 1.60 -CYS_HIS_exception 1.60 -CYS_CYS_exception 3.60 - -# Coulomb interaction parameters -coulomb_cutoff1 4.0 -coulomb_cutoff2 10.0 -coulomb_diel 80.0 - -# Backbone hydrogen bond parameters -backbone_NH_hydrogen_bond COO -0.85 2.00 3.00 -#backbone_NH_hydrogen_bond C- -0.85 2.00 3.00 -backbone_NH_hydrogen_bond CYS -0.85 3.00 4.00 -backbone_NH_hydrogen_bond TYR -0.85 2.20 3.20 -backbone_NH_hydrogen_bond OCO -0.85 2.00 3.50 -backbone_NH_hydrogen_bond NAR -0.85 2.00 3.50 - -backbone_CO_hydrogen_bond HIS 0.85 2.00 3.00 -backbone_CO_hydrogen_bond OCO 0.85 3.00 4.00 -backbone_CO_hydrogen_bond CG 0.85 2.00 4.00 -backbone_CO_hydrogen_bond C2N 0.85 2.00 4.00 -backbone_CO_hydrogen_bond N30 0.85 2.00 4.00 -backbone_CO_hydrogen_bond N31 0.85 2.00 4.00 -backbone_CO_hydrogen_bond N32 0.85 2.00 4.00 -backbone_CO_hydrogen_bond N33 0.85 2.00 4.00 -backbone_CO_hydrogen_bond NAR 0.85 2.00 3.50 - -# Group charges -charge COO -1 -charge HIS +1 -charge CYS -1 -charge TYR -1 -charge LYS +1 -charge ARG +1 -charge N+ +1 -charge C- -1 -charge OCO -1 -charge SER -1 -charge CG +1 -charge C2N +1 -charge N30 +1 -charge N31 +1 -charge N32 +1 -charge N33 +1 -charge NAR +1 -charge SH -1 -charge OP -1 - -# list of acids -acid_list ASP -acid_list GLU -acid_list CYS -acid_list TYR -acid_list SER -acid_list C- -acid_list OCO -acid_list OP -acid_list SH - -# list of bases -base_list ARG -base_list LYS -base_list HIS -base_list N+ -base_list CG -base_list C2N -base_list N30 -base_list N31 -base_list N32 -base_list N33 -base_list NAR - -# list of groups used in backbone reorganisation calculations -backbone_reorganisation_list ASP -backbone_reorganisation_list GLU - -# Residues that should be ignored -ignore_residues HOH -ignore_residues H2O -ignore_residues HOH -ignore_residues SO4 -ignore_residues PO4 -ignore_residues PEG -ignore_residues EPE -#ignore_residues NAG -ignore_residues TRS - -# Relative Van der Waals volume parameters for the radial volume model -# Radii adopted from Bondi, A. (1964). "Van der Waals Volumes and Radii". J. Phys. Chem. 68 (3): 441-51 -VanDerWaalsVolume C 1.40 # radius: 1.70, volume: 20.58 all 'C' and 'CA' atoms -VanDerWaalsVolume C4 2.64 # 38.79 hydrodphobic carbon atoms + unidentified atoms -VanDerWaalsVolume N 1.06 # radius: 1.55, volume: 15.60 all nitrogen atoms -VanDerWaalsVolume O 1.00 # radius: 1.52, volume: 14.71 all oxygen atoms -VanDerWaalsVolume S 1.66 # radius: 1.80, volume: 24.43 all sulphur atoms -VanDerWaalsVolume F 0.90 # raidus: 1.47, volume: 13.30 for fluorine -VanDerWaalsVolume Cl 1.53 # radius: 1.75, volume: 22.44 for chlorine -VanDerWaalsVolume P 1.66 # radius: 1.80, volume: 24.42 for phosphorus - -# Other desolvation parameters -desolvationSurfaceScalingFactor 0.25 -desolvationPrefactor -13.0 -desolvationAllowance 0.0 -desolv_cutoff 20.0 -buried_cutoff 15.0 -Nmin 280 -Nmax 560 - -# Ligand groups -ligand_typing groups -min_bond_distance_for_hydrogen_bonds 4 - -# covalent coupling -coupling_max_number_of_bonds 3 -shared_determinants 0 -common_charge_centre 0 -remove_penalised_group 1 - -# non-covalent coupling -max_intrinsic_pKa_diff 2.0 -min_interaction_energy 0.5 -max_free_energy_diff 1.0 -min_swap_pka_shift 1.0 -min_pka 0.0 -max_pka 10.0 -pH variable -reference neutral - -# ions -ions 1P 1 # generic charged atoms -ions 2P 2 -ions 1N -1 -ions 2N -2 - -ions MG 2 #Magnesium Ion -ions CA 2 #Calcium Ion -ions ZN 2 #Zinc Ion -ions NA 1 #Sodium Ion -ions CL -1 #Chloride Ion -ions MN 2 #Manganese (ii) Ion -ions K 1 #Potassium Ion -ions CD 2 #Cadmium Ion -ions FE 3 #Fe (iii) Ion -ions SR 2 #Strontium Ion -ions CU 2 #Copper (ii) Ion -ions IOD -1 #Iodide Ion -ions HG 2 #Mercury (ii) Ion -ions BR -1 #Bromide Ion -ions CO 2 #Cobalt (ii) Ion -ions NI 2 #Nickel (ii) Ion -ions FE2 2 #Fe (ii) Ion - -# write out order of residues -write_out_order ASP -write_out_order GLU -write_out_order C- -write_out_order HIS -write_out_order CYS -write_out_order TYR -write_out_order LYS -write_out_order ARG -write_out_order SER -write_out_order N+ -write_out_order CG -write_out_order C2N -write_out_order N30 -write_out_order N31 -write_out_order N32 -write_out_order N33 -write_out_order NAR -write_out_order OCO -write_out_order SH -write_out_order OP diff --git a/propka/__main__.py b/propka/__main__.py new file mode 100644 index 0000000..3aa53ea --- /dev/null +++ b/propka/__main__.py @@ -0,0 +1,8 @@ +"""Allow the PROPKA package to be run as a program. + +For example, `python -m propka` +""" +from .run import main + +if __name__ == "__main__": + main() diff --git a/propka/lib.py b/propka/lib.py index cd25446..1988fd8 100644 --- a/propka/lib.py +++ b/propka/lib.py @@ -222,7 +222,7 @@ def build_parser(parser=None): return parser -def loadOptions(args): +def loadOptions(args=None): """ Load the arguments parser with options. Note that verbosity is set as soon as this function is invoked. @@ -232,18 +232,11 @@ def loadOptions(args): Returns: argparse namespace """ - # defining a 'usage' message - usage = "usage: %prog [options] filename" - # loading the parser parser = build_parser() # parsing and returning options and arguments - if len(args) == 0: - # command line - options = parser.parse_args() - else: - options = parser.parse_args(args) + options = parser.parse_args(args) # adding specified filenames to arguments options.filenames.append(options.input_pdb)