### Install forgi from source directory Source: https://viennarna.github.io/forgi/download Installs the forgi package from a local source directory using pip. This method is recommended over directly invoking setup.py. ```Shell pip install --upgrade path/to/forgi/directory ``` -------------------------------- ### Get version string Source: https://viennarna.github.io/forgi/apidoc/forgi.utilities Retrieves the version string of the forgi package. If installed from GitHub, it uses 'git describe' to get the version. Otherwise, it attempts to get the commit hash directly. ```Python forgi.utilities.stuff.get_version_string() ``` -------------------------------- ### Install forgi with all optional dependencies from PyPI Source: https://viennarna.github.io/forgi/download Installs or upgrades the forgi package along with all its optional dependencies from PyPI. This is useful for enabling all features of forgi. ```Shell pip install --upgrade forgi[all] ``` -------------------------------- ### Install forgi with visualization dependencies Source: https://viennarna.github.io/forgi/download Installs forgi with specific optional dependencies for visualization, such as matplotlib. This is required for functions in forgi.threedee.visual, forgi.visual, and forgi.projection. ```Shell pip install forgi[forgi.visual] ``` -------------------------------- ### Install forgi with development dependencies Source: https://viennarna.github.io/forgi/download Installs forgi with development dependencies, including Cython. This is typically not needed for regular use as forgi includes pre-generated C-code. ```Shell pip install forgi[development] ``` -------------------------------- ### Install forgi from PyPI Source: https://viennarna.github.io/forgi/download Installs or upgrades the forgi package from the Python Package Index (PyPI). This command ensures you have the latest stable version of forgi. ```Shell pip install --upgrade forgi ``` -------------------------------- ### Install forgi with PDBeChem dependencies Source: https://viennarna.github.io/forgi/download Installs forgi with the beautifulsoup4 dependency, which is needed for fetching information about modified residues in PDB files. ```Shell pip install forgi[pdbechem] ``` -------------------------------- ### Get Forgi Version String Source: https://viennarna.github.io/forgi/_modules/forgi/utilities/stuff Retrieves the version string for the forgi library. It prioritizes version information from Git tags if installed from a repository, otherwise falls back to the package's defined version. ```Python from builtins import next from builtins import range import itertools as it import contextlib import random import shutil import tempfile as tf import collections as col import sys import subprocess import logging log = logging.getLogger(__name__) import forgi import forgi.utilities.debug as cud from .exceptions import GraphConstructionError bracket_left = "([{ 1: log.error("Seq_id %s occurs %s times!", k, amount) else: break if c.most_common()[0][1] == 1: raise ValueError("len %{} ({}) != ({}) len {}".format( self._lookup, len(self._lookup), len(self._list), self._list)) raise ValueError( "Duplicate Seq_id encountered: {}".format(c.most_common()[0][0])) def __getitem__(self, i): return self._list[i] def __len__(self): ``` -------------------------------- ### Sort Points Along a Line (Python) Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/utilities/vector Sorts a list of points based on their distance from a specified start point along a line defined by the start and end points. The start and end points are also included in the sorted list. ```Python def sortAlongLine(start, end, points): """ Sort all points in points along the line from start to end. :param start: A point :param end: A point :param points: A list of points :returns: A list containing start, end and all elements of points, sorted by the distance from start """ # print start, end, points s_points = points + [start, end] s_points.sort(key=lambda x: vec_distance(x, start)) return s_points ``` -------------------------------- ### Rosetta Constraints File Format Source: https://viennarna.github.io/forgi/graph_tutorial An example output format for a Rosetta rna_denovo constraint file, generated from an RNA dot-bracket sequence, indicating paired nucleotide positions. ```Text STEM PAIR 42 60 STEM PAIR 43 59 STEM PAIR 44 58 STEM PAIR 45 57 STEM PAIR 46 56 STEM PAIR 47 55 STEM PAIR 13 33 STEM PAIR 14 32 STEM PAIR 15 31 STEM PAIR 16 30 STEM PAIR 17 29 STEM PAIR 18 28 STEM PAIR 19 27 STEM PAIR 1 71 STEM PAIR 2 70 STEM PAIR 3 69 STEM PAIR 4 68 STEM PAIR 5 67 STEM PAIR 6 66 STEM PAIR 7 65 STEM PAIR 8 64 STEM PAIR 9 63 ``` -------------------------------- ### Try Starting Points with Heuristics Source: https://viennarna.github.io/forgi/_modules/forgi/projection/hausdorff This function appears to be part of a larger optimization process. It calculates the longest diameter of a reference image and then iterates through a set of starting points (projection directions). For each starting point, it generates a projection and potentially applies heuristics based on the image diameter and scale. It tracks heuristics usage and best scores. ```Python def _try_startpoints(ref_img, scale, cg, start_points, starting_rotations, starting_offsets, local_maxiter, virtual_atoms, use_heuristic, distance, verbose): # Longest extention in the image longest_distance_image = get_longest_img_diameter(ref_img, scale) if longest_distance_image == 0: raise ValueError("Reference image probably empty") # We count, how often certain heuristics kicked in la_heur = 0 no_heur = 0 score_heur = 0 # dpi = len(ref_img) best_score = float('inf') decrease = float("inf") for i, project_dir in enumerate(start_points): sys.stdout.write("{:2.0%}\r".format(i / len(start_points))) # Progress sys.stdout.flush() proj = fhp.Projection2D(cg, from_polar([1] + list(project_dir)), project_virtual_atoms=virtual_atoms) if use_heuristic: # 4 pixels is arbitrary heuristic if abs(proj.longest_axis - longest_distance_image) > 6 * scale / dpi: ``` -------------------------------- ### Calculate Stem Length Source: https://viennarna.github.io/forgi/_modules/forgi/graph/bulge_graph Calculates the length of a stem based on its defined start and end points. The length is determined by the difference between the end and start indices plus one. ```Python def stem_length(self, key): d = self.defines[key] length = 0 for i in range(0, len(d), 2): length += d[i + 1] - d[i] + 1 return length ``` -------------------------------- ### RNA Loading and Structure Utilities in Forgi Source: https://viennarna.github.io/forgi/genindex Utilities for loading RNA data, including loading from command line arguments and loading structural information from PDB files. ```Python load_rna() load_structure() ``` -------------------------------- ### Bresenham Line Rasterization Source: https://viennarna.github.io/forgi/apidoc/forgi.projection Rasterizes a line from a start point to an end point onto a grid with a grid-width of 1. It takes start and end coordinates as input and returns a list of integer (x,y) tuples representing the rasterized line. ```Python forgi.projection.projection2d.bresenham(_start_, _end_) ``` -------------------------------- ### Developer Representation of Object Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/model/linecloud Returns a developer-friendly string representation of the object, including its type, memory address, and a concise summary of its contents. ```Python def __repr__(self): return "<{} object at {} with {}>".format(type(self).__name__, hex(id(self)), str(self).replace("\n", "; ")) ``` -------------------------------- ### Calculate Clockwise Angle Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/utilities/my_math Determines the amount of clockwise rotation needed to move from a starting angle (a1) to a target angle (a2). If the target angle is less than the starting angle, it adds 2 * pi to the target angle to ensure a positive clockwise rotation. This is useful in applications involving circular motion or angular measurements. ```Python import math [docs]def clock_angle(a1, a2): ''' The amount one needs to rotate from angle a1 to angle a2 in a clockwise direction. I.e. increasing a1 until it reaches a2. @param a1: The first angle. @param a2: The second angle. ''' if a2 < a1: a2 += 2. * math.pi return a2 - a1 ``` -------------------------------- ### Generate Graphviz Visualization from Dot-Bracket Source: https://viennarna.github.io/forgi/graph_tutorial This snippet illustrates converting an RNA secondary structure from dot-bracket format to a format suitable for Graphviz's `neato` program, generating a PNG image of the structure's graph representation. ```Shell python examples/rnaConvert.py examples/input/1y26_ss.dotbracket -T neato | neato -Tpng -o 1y26_neato.png ``` -------------------------------- ### Initialize ClusteredAngleStats Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/model/stats Initializes the ClusteredAngleStats class by parsing a clustered angle statistics file. It reads the file line by line, identifying cluster definitions and individual angle statistics, and stores them in a dictionary. Dependencies include the AngleStat class and the collections.defaultdict. ```Python class ClusteredAngleStats(object): def __init__(self, filename): """ A collection of clustered angle_stats. Whenever stats for a certain key are retrieved, only one (randomly choosen) representative per cluster is returned. Requires a clustered angle stats file (created by fess/scripts/cluster_stats.py). The file should look like this: ' # Cluster 0 for (1, 1, -1): angle RS_1788_S_000008_A 1 1 1.520877 1.837257 -1.380352 11.237569 0.867246 2.057771 1 19 19 30 30 UCG CAA # Cluster 1 for (1, 1, -1): angle RS_1140_S_000002_A 1 1 1.563667 1.869580 -0.967966 16.241881 0.896602 2.177000 -1 13 13 24 24 ACG CUU angle RS_1183_S_000008_A 1 1 1.533551 1.914482 -1.108396 15.780723 0.829850 2.255556 -1 4 4 46 46 UAG CAG ' :param filename: The filename of the clustered angle stats file. """ #: A dict `(dim1, dim2, ang_type)` : list of lists. #: Each value is a list of clusters, and each cluster is a list. self._stats_dict = c.defaultdict(list) lastkey = None with open(filename) as f: for line in f: if line.startswith('# Cluster'): fields = line.split() dim1 = int(fields[4].lstrip("(").rstrip(",")) dim2 = int(fields[5].rstrip(",")) ang_type = int(fields[6].rstrip("): ")) self._stats_dict[(dim1, dim2, ang_type)].append([]) lastkey = (dim1, dim2, ang_type) elif line.startswith('#'): continue else: angle_stat = AngleStat() angle_stat.parse_line(line) # I don't know what this does, I just copied the following 2 lines from # Peter's code in get_angle_stats if len(angle_stat.define) > 0 and angle_stat.define[0] == 1: continue assert lastkey == (angle_stat.dim1, angle_stat.dim2, angle_stat.ang_type) or lastkey == ( angle_stat.dim2, angle_stat.dim1, -angle_stat.ang_type) self._stats_dict[lastkey][-1].append(angle_stat) ``` -------------------------------- ### Get Sequence Property Source: https://viennarna.github.io/forgi/_modules/forgi/graph/bulge_graph A property that returns the RNA sequence itself. ```Python @property def seq(self): return self._seq ``` -------------------------------- ### Experimental Modules ftm.ensemble, ftm.ensemble2, ftu.dssr Source: https://viennarna.github.io/forgi/changelog The modules `ftm.ensemble`, `ftm.ensemble2`, and `ftu.dssr` are now included but marked as EXPERIMENTAL. ```Python # No specific code snippet provided, modules are experimental. ``` -------------------------------- ### Get Sequence Length Property Source: https://viennarna.github.io/forgi/_modules/forgi/graph/bulge_graph A property that returns the length of the RNA sequence. ```Python @property def seq_length(self): return len(self.seq) ``` -------------------------------- ### Get Some Leaf-Leaf Distances in Projection2D Source: https://viennarna.github.io/forgi/apidoc/forgi.projection Retrieves a subset of distances between leaf nodes in the projection. ```Python def get_some_leaf_leaf_distances(self): """Get a list of distances between any pair of leaf nodes. The distances are measured in direct line, not along the path """ pass ``` -------------------------------- ### Initialize ConformationStats Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/model/stats Initializes the ConformationStats class, loading various statistical data for RNA conformations. It can either load raw angle statistics or pre-clustered angle statistics, along with stem, five-prime, three-prime, and loop statistics. Dependencies include get_angle_stats, ClusteredAngleStats, get_stem_stats, get_fiveprime_stats, get_threeprime_stats, and get_loop_stats. ```Python class ConformationStats(object): def __init__(self, stats_file, clustered_angle_stats_file=None): if clustered_angle_stats_file is None: self.angle_stats = get_angle_stats(stats_file, refresh=True) else: self.angle_stats = ClusteredAngleStats(clustered_angle_stats_file) self.stem_stats = get_stem_stats(stats_file, refresh=True) self.fiveprime_stats = get_fiveprime_stats(stats_file, refresh=True) self.threeprime_stats = get_threeprime_stats(stats_file, refresh=True) self.loop_stats = get_loop_stats(stats_file, refresh=True) self.constrained_stats = c.defaultdict(list) ``` -------------------------------- ### Main Execution Block Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/utilities/modified_res This block configures logging, prints a header indicating the script's execution, and creates a dictionary of residue information from PDB files specified as command-line arguments. It also adds common ions to the dictionary and prints the resulting dictionary. ```python if __name__ == "__main__": logging.basicConfig(level=logging.INFO) print("# Created by `python {}`".format(" ".join(sys.argv))) print("RESIDUE_DICT = ", end="") d = dict_from_pdbs(sys.argv[1:]) for ion in ["MG", "NA", "K", "CL"]: if ion not in d: d[ion] = None pprint({k: v for k, v in d.items() if v is not None}) ``` -------------------------------- ### Get Vector Centroid Source: https://viennarna.github.io/forgi/genindex Calculates the centroid of a given vector. This utility is part of the vector module. ```Python from forgi.threedee.utilities.vector import get_vector_centroid ``` -------------------------------- ### Timing Orthonormal Basis Creation Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/utilities/vector Compares the performance of two methods for creating orthonormal bases (`create_orthonormal_basis1` and `create_orthonormal_basis`). It times the execution of each method with 100,000 repetitions and prints the results. ```Python def time_cob1(): vec1 = get_random_vector() vec2 = get_random_vector() basis = create_orthonormal_basis1(vec1, vec2) def time_cob2(): vec1 = get_random_vector() vec2 = get_random_vector() basis = create_orthonormal_basis(vec1, vec2) def time_cob(): t1 = timeit.Timer("time_cob1()", "from forgi.threedee.utilities.vector import time_cob1") t2 = timeit.Timer("time_cob2()", "from forgi.threedee.utilities.vector import time_cob2") print "1: ", t1.repeat(number=100000) #prints [3.045403003692627, 3.0388529300689697, 3.0359420776367188] print "2: ", t2.repeat(number=100000) #prints [2.7473390102386475, 2.74338698387146, 2.731964111328125] ``` -------------------------------- ### Get Twist Parameters Source: https://viennarna.github.io/forgi/genindex Retrieves twist parameters for a given angle statistic. This is a method of the AngleStat class. ```Python twist_params() ``` -------------------------------- ### Initialize PymolPrinter for RNA Visualization Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/visual/pymol The `PymolPrinter` class is initialized with various attributes to control RNA visualization in PyMOL. These attributes include settings for displaying virtual residues, rainbow coloring, basis vectors, sidechain atoms, and colors for different RNA features like stems and loops. ```Python class PymolPrinter(object): def __init__(self): self.display_virtual_residues = False self.rainbow = False self.basis = None self.visualize_three_and_five_prime = True self.encompassing_stems = False self.state = 2 self.virtual_atoms = False self.sidechain_atoms = False self.override_color = None self.element_specific_colors = None self.print_text = True self.add_longrange = False self.add_loops = True self.max_stem_distances = 0 self.add_letters = False self.draw_axes = False self.draw_segments = True self.movie = False self.stem_color = 'green' self.multiloop_color = 'red' self.prev_obj_name = '' # The name of the previously created # object which needs to be hidden # when creating a movie self.only_elements = None self.cylinder_width = 1.0 self.show_twists = True self.plotters = [] self.show_bounding_boxes = False ``` -------------------------------- ### Get Total Length of CoarseGrainRNA Source: https://viennarna.github.io/forgi/genindex Returns the total length of the CoarseGrainRNA model. This is a method of the CoarseGrainRNA class. ```Python total_length() ``` -------------------------------- ### Get Position Parameters Source: https://viennarna.github.io/forgi/genindex Retrieves position-related parameters for an AngleStat object. This method is part of the forgi.threedee.model.stats module. ```Python from forgi.threedee.model.stats import AngleStat # Assuming 'angle_stat' is an instance of AngleStat # params = angle_stat.position_params() ``` -------------------------------- ### Get All Define Strings Source: https://viennarna.github.io/forgi/_modules/forgi/graph/bulge_graph Converts all 'defines' into a formatted string. Each define entry follows the format: 'define [name] [start_res1] [end_res1] [start_res2] [end_res2]'. The defines are sorted before formatting. ```Python def _get_define_str(self): """ Convert the defines into a string. Format: define [name] [start_res1] [end_res1] [start_res2] [end_res2] """ defines_str = '' # a method for sorting the defines def define_sorter(k): ``` -------------------------------- ### String Representation of Object Source: https://viennarna.github.io/forgi/_modules/forgi/threedee/model/linecloud Provides a human-readable string representation of the coordinate storage object, listing elements and their associated coordinate values. ```Python def __str__(self): lines = [] for elem in self._elem_names: lines.append("{}: ".format(elem) + ", ".join(str(val) for val in self[elem])) return("\n".join(lines)) ``` -------------------------------- ### Get Twist Parameter Source: https://viennarna.github.io/forgi/genindex Retrieves the parameter related to the twist of structural components. This function is in the graph_pdb utilities. ```Python from forgi.threedee.utilities.graph_pdb import get_twist_parameter ``` -------------------------------- ### Get Twist Angle Source: https://viennarna.github.io/forgi/genindex Calculates the twist angle between structural elements. This utility is part of the graph_pdb module. ```Python from forgi.threedee.utilities.graph_pdb import get_twist_angle ``` -------------------------------- ### GNU General Public License v3 Source: https://viennarna.github.io/forgi/license_link The GNU General Public License (GPL) version 3 provides a legal framework for software freedom. It allows users to freely use, study, share, and modify the software, with the condition that any derivative works are also distributed under the same license. This ensures that the software remains free for all subsequent users. ```text GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through ``` -------------------------------- ### Get Centroid (Forgi) Source: https://viennarna.github.io/forgi/genindex Calculates the centroid of a structural element in an RNA. This function is part of the forgi.threedee.utilities.graph_pdb module. ```Python get_centroid() ``` -------------------------------- ### Create RNA Input Parser Source: https://viennarna.github.io/forgi/_modules/forgi/utilities/commandline_utils Generates an argument parser for handling RNA input files. It supports various file formats like PDB, forgi cg, forgi bg, FASTA, and dot-bracket strings. Options for controlling stem dissolution, PDB-specific parsing (pseudoknots, chains, secondary structure), and logging verbosity are included. ```Python from __future__ import print_function import sys import argparse import logging import os.path import contextlib import warnings import textwrap import numpy as np from .exceptions import GraphConstructionError from logging_exceptions import log_to_exception import logging_exceptions import forgi.graph.bulge_graph as fgb import forgi.threedee.model.coarse_grain as ftmc log = logging.getLogger(__name__) class WrongFileFormat(ValueError): """ Error raised if the input file has the wrong file format or the file format could not be detected. """ def get_rna_input_parser(helptext, nargs=1, rna_type="any", enable_logging=True, parser_kwargs={}): parser = argparse.ArgumentParser(description=helptext, **parser_kwargs) if nargs == 1: helptext = "One file containing an RNA.\n" elif isinstance(nargs, int) and nargs > 1: helptext = "{:d} files containing one RNA each.\n".format(nargs) elif nargs == "+": helptext = "One or more files containing one or more RNAs each.\n" else: raise ValueError( "get_parser_any_cgsg does not support nargs={}".format(nargs)) if rna_type != "only_cg": fileformats = ["pdb files"] else: fileformats = [] if rna_type != "pdb": fileformats.append("forgi cg files") if rna_type != "3d" and rna_type != "only_cg": fileformats.append("forgi bg files") fileformats.append("fasta files") if rna_type == "any": fileformats.append("dotbracketfiles") n = len(fileformats) helptext += "\n".join(textwrap.wrap( "Supported Filetypes are: {}".format(", ".join(fileformats)), 55)) if rna_type == "any": helptext += ("Alternatively you can supply a dotbracket-string\n " "(containing only the characters '.()[]{}&') from the commandline.\n") parser.add_argument("rna", nargs=nargs, type=str, help=helptext) parser.add_argument("--keep-length-one-stems", action="store_true", help="For all input formats except forgi bg/cg files,\n" "this controlls whether stems of length one are \n" "dissolved to unpaired regions (default) \n" "or kept (if this option is present).\n" "In the case of input in forgi-format,\n" "the RNA from the file is not modified.") if rna_type != "only_cg": pdb_input_group = parser.add_argument_group("Options for loading of PDB files", description="These options only take effect, " "if the input RNA is in pdb file format.") pdb_input_group.add_argument("--pseudoknots", action="store_true", help="Allow pseudoknots when extracting the structure\n" "from PDB files.") pdb_input_group.add_argument("--chains", type=str, help="When reading pdb-files: Only extract the given chain(s). Comma-seperated") pdb_input_group.add_argument("--pdb-secondary-structure", type=str, default="", help="When reading a single chain from a pdb-files: \nEnforce the secondary structure given as dotbracket\n string. (This only works, if --chain is given!)") pdb_input_group.add_argument("--pdb-annotation-tool", type=str, default=None, help="What program to use for detecting basepairs in PDB/ MMCIF structures." " This commandline option overrides the value in the config file (if present)." "If this is not present and no config-file is given, we try to detect the installed programs.") pdb_input_group.add_argument("--pdb-allow-www-query", action="store_true", help="Usually, if modified residues/ ligand with an unknown 3-letter code are encountered in PDB files, " "they are removed from the chain and a log message of severity INFO is issued. " "With this option, we first try to query the PDBeChem database for the 3-letter code, to " "see whether or not it is a modified residue that can be converted to its standard parent " " and should be part of the chain.") if enable_logging: verbosity_group = parser.add_argument_group( "Control verbosity of logging output") logging_exceptions.update_parser(verbosity_group) return parser def cgs_from_args(args, rna_type="any", enable_logging=True, return_filenames=False, skip_errors=False): """ ```