diff --git a/FRETpredict/FRET.py b/FRETpredict/FRET.py index 597616d..7b36d0f 100644 --- a/FRETpredict/FRET.py +++ b/FRETpredict/FRET.py @@ -153,9 +153,11 @@ def __init__(self, protein, residues, **kwargs): # Logging set up if self.verbose: - logging.basicConfig(filename=kwargs.get('log_file', 'log'), level=logging.INFO) - else: logging.basicConfig(filename=kwargs.get('log_file', 'log'), level=logging.DEBUG) + logging.root.setLevel(logging.DEBUG) + else: + logging.basicConfig(filename=kwargs.get('log_file', 'log'), level=logging.INFO) + logging.root.setLevel(logging.INFO) # Write the string for the placement residues selection for i in range(2): @@ -167,7 +169,7 @@ def __init__(self, protein, residues, **kwargs): residue_sel += " and segid {:s}".format(self.chains[i]) # Logging information on the selected residues - logging.info('{:s} = {:s}'.format(residue_sel, self.protein.select_atoms(residue_sel).atoms.resnames[0])) + logging.debug('{:s} = {:s}'.format(residue_sel, self.protein.select_atoms(residue_sel).atoms.resnames[0])) # Raise error if the specified placement residues are different from two if len(residues) != 2: @@ -337,7 +339,7 @@ def trajectoryAnalysis(self): """ # Print info - logging.info("Starting rotamer distance analysis of trajectory {:s} with labeled residues " + logging.debug("Starting rotamer distance analysis of trajectory {:s} with labeled residues " "{:d} and {:d}".format(self.protein.trajectory.filename, self.residues[0], self.residues[1])) # Create H5PY file @@ -511,7 +513,7 @@ def save(self, **kwargs): if self.weights.size != k2.size: # Warning log - logging.info('Weights array has size {} whereas the number of frames is {}'. + logging.debug('Weights array has size {} whereas the number of frames is {}'. format(self.weights.size, k2.size)) # Raise error @@ -534,7 +536,7 @@ def save(self, **kwargs): if self.user_weights.size != k2.size: # Warning log - logging.info('User weights array has size {} whereas the number of frames is {}'. + logging.debug('User weights array has size {} whereas the number of frames is {}'. format(self.user_weights.size, k2.size)) # Raise error @@ -553,7 +555,7 @@ def save(self, **kwargs): else: # Warning log - logging.info('User weights argument should be a numpy array') + logging.debug('User weights argument should be a numpy array') # Raise error raise ValueError('User weights argument should be a numpy array') @@ -647,4 +649,4 @@ def run(self): # Calculate k2 distribution and k2, Static, Dynamic1, Dynamic2 averaging. Save data to file. self.save() - logging.info('Done') + logging.debug('Done') diff --git a/FRETpredict/__init__.py b/FRETpredict/__init__.py index b264007..d141203 100644 --- a/FRETpredict/__init__.py +++ b/FRETpredict/__init__.py @@ -4,6 +4,6 @@ from .lennardjones import lj_parameters from .libraries import * -__version__ = '0.2.2' +__version__ = '0.2.7' diff --git a/FRETpredict/lib/libraries.yml b/FRETpredict/lib/libraries.yml index c3bd31d..a90e9b0 100644 --- a/FRETpredict/lib/libraries.yml +++ b/FRETpredict/lib/libraries.yml @@ -1,6 +1,6 @@ ATTO 390 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T39_C2R_cutoff30 licence: GPLv3 mu: @@ -12,7 +12,7 @@ ATTO 390 C2R: - C7 and resname T39 ATTO 390 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T39_L1R_cutoff30 licence: GPLv3 mu: @@ -24,7 +24,7 @@ ATTO 390 L1R: - C7 and resname T39 ATTO 425 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T42_C2R_cutoff30 licence: GPLv3 mu: @@ -36,7 +36,7 @@ ATTO 425 C2R: - C7 and resname T42 ATTO 425 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T42_L1R_cutoff30 licence: GPLv3 mu: @@ -48,7 +48,7 @@ ATTO 425 L1R: - C7 and resname T42 ATTO 465 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T46_C2R_cutoff30 licence: GPLv3 mu: @@ -63,7 +63,7 @@ ATTO 465 C2R: - N1 and resname T46 ATTO 465 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T46_L1R_cutoff30 licence: GPLv3 mu: @@ -78,7 +78,7 @@ ATTO 465 L1R: - N1 and resname T46 ATTO 488 C3R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T48_C3R_cutoff30 licence: GPLv3 mu: @@ -94,7 +94,7 @@ ATTO 488 C3R: - C15 and resname T48 ATTO 495 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T49_C2R_cutoff30 licence: GPLv3 mu: @@ -107,7 +107,7 @@ ATTO 495 C2R: - N1 and resname T49 ATTO 495 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T49_L1R_cutoff30 licence: GPLv3 mu: @@ -120,7 +120,7 @@ ATTO 495 L1R: - N1 and resname T49 ATTO 520 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T52_C2R_cutoff30 licence: GPLv3 mu: @@ -134,7 +134,7 @@ ATTO 520 C2R: - C7 and resname T52 ATTO 520 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T52_L1R_cutoff30 licence: GPLv3 mu: @@ -148,7 +148,7 @@ ATTO 520 L1R: - C7 and resname T52 ATTO 610 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T61_C2R_cutoff30 licence: GPLv3 mu: @@ -162,7 +162,7 @@ ATTO 610 C2R: - C8 and resname T61 ATTO 610 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: T61_L1R_cutoff30 licence: GPLv3 mu: @@ -176,7 +176,7 @@ ATTO 610 L1R: - C8 and resname T61 ATTO Thio12 C3R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: Tth_C3R_cutoff30 licence: GPLv3 mu: @@ -190,7 +190,7 @@ ATTO Thio12 C3R: - C9 and resname Tth AlexaFluor 350 C1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A35_C1R_cutoff30 licence: GPLv3 mu: @@ -204,7 +204,7 @@ AlexaFluor 350 C1R: - C5 and resname A35 AlexaFluor 350 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A35_L1R_cutoff30 licence: GPLv3 mu: @@ -218,7 +218,7 @@ AlexaFluor 350 L1R: - C5 and resname A35 AlexaFluor 488 B1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A48_B1R_cutoff30 licence: GPLv3 mu: @@ -235,7 +235,7 @@ AlexaFluor 488 B1R: - C7 and resname A48 AlexaFluor 488 C1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A48_C1R_cutoff30 licence: GPLv3 mu: @@ -252,7 +252,7 @@ AlexaFluor 488 C1R: - C7 and resname A48 AlexaFluor 488 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A48_L1R_cutoff30 licence: GPLv3 mu: @@ -269,7 +269,7 @@ AlexaFluor 488 L1R: - C7 and resname A48 AlexaFluor 532 C1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A53_C1R_cutoff30 licence: GPLv3 mu: @@ -285,7 +285,7 @@ AlexaFluor 532 C1R: - C7 and resname A53 AlexaFluor 532 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A53_L1R_cutoff30 licence: GPLv3 mu: @@ -301,7 +301,7 @@ AlexaFluor 532 L1R: - C7 and resname A53 AlexaFluor 568 C1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A56_C1R_cutoff30 licence: GPLv3 mu: @@ -318,7 +318,7 @@ AlexaFluor 568 C1R: - C10 and resname A56 AlexaFluor 568 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A56_L1R_cutoff30 licence: GPLv3 mu: @@ -335,7 +335,7 @@ AlexaFluor 568 L1R: - C10 and resname A56 AlexaFluor 594 C1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A59_C1R_cutoff30 licence: GPLv3 mu: @@ -352,7 +352,7 @@ AlexaFluor 594 C1R: - C10 and resname A59 AlexaFluor 594 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A59_L1R_cutoff30 licence: GPLv3 mu: @@ -369,7 +369,7 @@ AlexaFluor 594 L1R: - C10 and resname A59 AlexaFluor 647 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A64_C2R_cutoff30 licence: GPLv3 mu: @@ -387,7 +387,7 @@ AlexaFluor 647 C2R: - C29 and resname A64 AlexaFluor 647 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: A64_L1R_cutoff30 licence: GPLv3 mu: @@ -466,7 +466,7 @@ Lumiprobe Cy5 C2R: - CX3 Lumiprobe Cy5.5 C2R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: C55_C2R_cutoff30 licence: GPLv3 mu: @@ -480,7 +480,7 @@ Lumiprobe Cy5.5 C2R: - C39 and resname C55 Lumiprobe Cy5.5 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: C55_L1R_cutoff30 licence: GPLv3 mu: @@ -494,7 +494,7 @@ Lumiprobe Cy5.5 L1R: - C39 and resname C55 Lumiprobe Cy7.5 L1R: author: D Montepietra, G Tesei, JM Martins, MBA Kunze, RB Best, K Lindorff-Larsen - citation: TBD + citation: https://doi.org/10.1038/s42003-024-05910-6 filename: C75_L1R_cutoff30 licence: GPLv3 mu: diff --git a/FRETpredict/libraries.py b/FRETpredict/libraries.py index f82caac..f4c340c 100644 --- a/FRETpredict/libraries.py +++ b/FRETpredict/libraries.py @@ -17,7 +17,9 @@ import yaml # Create logger -logger = logging.getLogger("MDAnalysis.app") +#logger = logging.getLogger("MDAnalysis.app") +#logger.setLevel(logging.DEBUG) +#logger.root.setLevel(logging.DEBUG) #: Name of the directory in the package that contains the library data. LIBDIR = "lib" @@ -107,17 +109,14 @@ def __init__(self, name): raise ValueError("No rotamer library with name {0} known: must be one of {1}".format( name, list(LIBRARIES.keys()))) - # Print logging information - logger.info("Using rotamer library '{0}' by {1[author]}".format(self.name, self.lib)) - logger.info("Please cite: {0[citation]}".format(self.lib)) - # Obtain filename path self.lib['filename'] = find_file(self.lib['filename'][:-2] + name.split(' cutoff')[1]) # Print logging information - logger.info("[rotamers] ensemble {:s} with topology {:s}.pdb".format(self.lib['filename'], - self.lib['filename'].split('_cutoff')[0])) - logger.info("[rotamers] populations {:s}".format(self.lib['filename'] + '_weights.txt')) + #logger.debug("Using rotamer library '{0}' by {1[author]}".format(self.name, self.lib)) + #logger.debug("Please cite: {0[citation]}".format(self.lib)) + #logger.debug("[rotamers] ensemble {:s} with topology {:s}.pdb".format(self.lib['filename'],self.lib['filename'].split('_cutoff')[0])) + #logger.debug("[rotamers] populations {:s}".format(self.lib['filename'] + '_weights.txt')) # If trajectory is not found if not os.path.isfile(self.lib['filename'] + '.dcd'):