frag_pele/Analysis/compute_atom_atom_distance.py
def parseArguments():
    """
        Parse the command-line options
        :returns: str, int, int --  path to file to results folder,
            index of the first atom,
            index of the second atom
    """
    desc = "It includes the atom-atom distance of the specified ones to report files\n"
    parser = argparse.ArgumentParser(description=desc)
    required_named = parser.add_argument_group('required named arguments')
    required_named.add_argument("sim_folder", type=str, help="Path to the simulation results.")

    required_named.add_argument("-a", "--atoms", type=int, nargs='+', action='append', 
                                help="List of pairs of indexes with atoms to compute the distance between them.")
    parser.add_argument("-t", "--traj", default="trajectory_",
                        help="Trajectory file prefix.")
    parser.add_argument("-r", "--rep", default="report_",
                        help="Report file prefix.")
    parser.add_argument("-p", "--proc", type=int, default=4,
                        help="Number of processors to paralellize the computation.")
    args = parser.parse_args()
    return args.sim_folder, args.atoms, args.traj, args.rep, args.proc

        Parse the command-line options
        :returns: str, int, int --  path to file to results folder,
            index of the first atom,
            index of the second atom
    
Parse the command-line options
Parse the command - line options
def parseArguments():
    desc = "It includes the atom-atom distance of the specified ones to report files\n"
    parser = argparse.ArgumentParser(description=desc)
    required_named = parser.add_argument_group('required named arguments')
    required_named.add_argument("sim_folder", type=str, help="Path to the simulation results.")
    required_named.add_argument("-a", "--atoms", type=int, nargs='+', action='append', 
                                help="List of pairs of indexes with atoms to compute the distance between them.")
    parser.add_argument("-t", "--traj", default="trajectory_",
                        help="Trajectory file prefix.")
    parser.add_argument("-r", "--rep", default="report_",
                        help="Report file prefix.")
    parser.add_argument("-p", "--proc", type=int, default=4,
                        help="Number of processors to paralellize the computation.")
    args = parser.parse_args()
    return args.sim_folder, args.atoms, args.traj, args.rep, args.proc
def parseArguments ( ) : desc = "It includes the atom-atom distance of the specified ones to report files\n" parser = argparse . ArgumentParser ( description = desc ) required_named = parser . add_argument_group ( 'required named arguments' ) required_named . add_argument ( "sim_folder" , type = str , help = "Path to the simulation results." ) required_named . add_argument ( "-a" , "--atoms" , type = int , nargs = '+' , action = 'append' , help = "List of pairs of indexes with atoms to compute the distance between them." ) parser . add_argument ( "-t" , "--traj" , default = "trajectory_" , help = "Trajectory file prefix." ) parser . add_argument ( "-r" , "--rep" , default = "report_" , help = "Report file prefix." ) parser . add_argument ( "-p" , "--proc" , type = int , default = 4 , help = "Number of processors to paralellize the computation." ) args = parser . parse_args ( ) return args . sim_folder , args . atoms , args . traj , args . rep , args . proc
Parse the command-line options
Parse the command - line options
"""
        Parse the command-line options
        :returns: str, int, int --  path to file to results folder,
            index of the first atom,
            index of the second atom
    """
str, int, int --  path to file to results folder,
index of the first atom,
index of the second atom
str int int -- path to file to results folder index of the first atom index of the second atom