def main(args): print_title("create-calendar", "Creates Persian calendar note-book template", "1.0", "2019", "*****@*****.**", "GPLv3+", True) day_pattern = ('تاریخ: {}/{}/{} {}\nعنوان: {}\nبرنامه: ' + '\nگزارش: \nبرآیند: \nتوضیحات: \n\n') month_pattern = '\n\n {} {}\n\n\n' month_names = ['فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'] day_names = ['شنبه', 'یکشنبه', 'دوشنبه', 'سهشنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه'] day = 1 month = 1 days = 365 year = 1400 index = 1 day_name = 1 file_path = '{}.txt'.format(year) with open(file_path, 'w') as f: for i in range(index, index + days): if day == 1: f.write(month_pattern.format( month_names[month - 1], convert_num_to_persian_str(year))) f.write(day_pattern.format( convert_num_to_persian_str(year), convert_num_to_persian_str(month), convert_num_to_persian_str(day), day_names[day_name], convert_num_to_persian_str(i))) day += 1 day_name += 1 if day_name > 6: day_name = 0 if (month < 7 and day > 31) or (month > 6 and day > 30): day = 1 month += 1 if month > 12: month = 1 Year += 1 print('\033[1mOutput: \033[1;35m{}\033[0m'.format(file_path)) return 0
parser.add_option("-i", dest="inputfile", type='string', help="Input file name") parser.add_option("-s", "--step", dest="step", type='string', help="Step number") parser.add_option("--logf", dest="logfile", type='string', help="Gaussian/GAMESS-US output logfile") parser.add_option("--fchk", dest="fchkfile", type='string', help="Gaussian fchk file") (options, args) = parser.parse_args() #============================================================================== # Get the input variables #============================================================================== # Print the title of the program version = '2.0' print_title('MCPB.py', version) options.step = options.step.lower() # Default values addres = [] addbpairs = [] anglefc_avg = 0 bondfc_avg = 0 chgfix_resids = [] cutoff = 2.8 if ambv < 12: raise pymsmtError('Only support AmberTools12 or higher version!') elif ambv in [12, 13]: ff_choice = 'ff12SB' else:
parser.add_option("-i", dest="inputfile", type='string', help="Input file name") parser.add_option("-s", "--step", dest="step", type='string', help="Step number") parser.add_option("--logf", dest="logfile", type='string', help="Gaussian/GAMESS-US output logfile") parser.add_option("--fchk", dest="fchkfile", type='string', help="Gaussian fchk file") (options, args) = parser.parse_args() #============================================================================== # Get the input variables #============================================================================== # Print the title of the program version = '1.0' print_title('MCPB.py', version) options.step = options.step.lower() # Default values cutoff = 2.8 addres = [] addbpairs = [] chgfix_resids = [] naamol2fs = [] ff_choice = 'ff14SB' gaff = 1 frcmodfs = [] gname = 'MOL' g0x = 'g03' ioninfo = [] sqmopt = 0
(with metal ion and ligating residues). """ from __future__ import print_function from msmtmol.readpdb import get_atominfo_fpdb, writepdbatm from msmtmol.element import METAL_PDB, CoRadiiDict, resdict from msmtmol.mol import pdbatm from msmtmol.cal import calc_bond, det_geo from optparse import OptionParser from title import print_title import os #============================================================================== # Print the title #============================================================================== print_title('PdbSearcher.py') #============================================================================== # Setting the options #============================================================================== parser = OptionParser("usage: -i/--ion ionname -l/--list input_file \n" " -e/--env environment_file \n" " -s/--sum summary_file \n" " [-c/--cut cutoff]") parser.add_option("-i", "--ion", type='string', dest="ionname", help="Element symbol of ion, e.g. Zn") parser.add_option("-l", "--list", type='string', dest="inputf", help="List file name, list file contains one PDB file name " "per line") parser.add_option("-e", "--env", type='string', dest='envrmtf',
print(" HFE=%6.1f (Kcal/mol), IOD=%5.2f (Angstrom), CN=%3.1f" % (dG, iod, cn)) print(" Exp:HFE=%6.1f (Kcal/mol), IOD=%5.2f (Angstrom)" % (HFE_VAL, IOD_VAL)) #----------------------------------------------------------------------------# # Main Program # #----------------------------------------------------------------------------# parser = OptionParser("Usage: IPMach.py -i inputfile") parser.add_option("-i", dest="inputf", type='string', help="Input file name") (options, args) = parser.parse_args() # Print the title of the program version = '1.0-beta' print_title('IPMach.py', version) #---------------------------Default values------------------------------------ # About the program and steps of TI running prog = 'sander' cpus = 2 gpus = 0 mode = 'normal' TIsteps = 2 rev = 1 ti_windows = 7 ti_vdw_windows = 3 ti_chg_windows = 7 # About the running type
parser = OptionParser("Usage: espgen.py -i input_file -o output_file " "[-v software]") parser.set_defaults(softversion='gau') parser.add_option("-i", dest="inputfile", type='string', help="Input file name") parser.add_option("-o", dest="outputfile", type='string', help="Output file name") parser.add_option("-v", dest="softversion", type='string', help="Software version [Default is gau (means Gaussian), \n" " other option is gms (means GAMESS-US)]") (options, args) = parser.parse_args() # Print the title of the program version = '1.0' print_title('espgen.py', version) if options.softversion == 'gau': get_esp_from_gau(options.inputfile, options.outputfile) elif options.softversion == 'gms': get_esp_from_gms(options.inputfile, options.outputfile) quit()
default=False, help="Make averge of Urey-Bradley force constants based on " "different ways of chosing sub Hessian matrices using " "Seminario method.") parser.add_option("--aavg", dest="aavg", action="store_true", default=False, help="Make averge of bond force constants based on " "different ways of chosing sub Hessian matrices using " "Seminario method.") (options, args) = parser.parse_args() # Print the title of the program version = '2.0' print_title('CartHess2FC.py', version) # Not suport combinations if options.softv == 'gms' and options.method == 'Z': raise pymsmtErorr("Don\'t support Z-matrix method using GAMESS-US in " "current verison!") avg = options.bavg or options.avg13 or options.aavg if avg is True and options.method == 'Z': raise pymsmtError("Make average of force constants are not applicable " "to Z-matrix method.") # Get the molecular information from the PDB file mol, atids, resids = get_atominfo_fpdb(options.pdbf)
help="The metal ion complex model chosen to calculate the " "sum of unsigned average errors of bond lengths, angles, " "and dihedrals (the units of them are angstrom, degree and " "degree respectively while the weights of them are 1/100, " "1/2 and 1 respectively). This sum is the criterion for the " "optimization (with a smaller value, better the " "parameters). The options are: 1 or 2. " "1 means a small model (only contains the metal ion and " "binding heavy atoms) while 2 means a big (contains the " "metal ion and heavy atoms in the ligating residues). " "[Default: 1]") (options, args) = parser.parse_args() # Print the title of the program version = '1.1' print_title('OptC4.py', version) #lowercase the input variables options.simupha = options.simupha.lower() options.minm = options.minm.lower() options.platf = options.platf.lower() #Get the metal center information from prmtop and coordinate files prmtop, mol, atids, resids = read_amber_prm(options.pfile, options.cfile) mask = AmberMask(prmtop, options.ion_mask) blist = get_blist(mol, atids) all_list = get_all_list(mol, blist, atids, 8.0) alist = all_list.anglist dlist = all_list.dihlist
dest='cutoff', help="Optional. The cut off value used to detect the bond " "between metal ion and ligating atoms. The unit is " "Angstroms. If there is no value specified, the " "default algorithm will be used. The default algorithm " "recognizes the bond when its distance is no less than " "0.1 (smaller than 0.1 usually indicates a low quality " "structure) and no bigger than the covalent radius sum " "of the two atoms with a tolerance of 0.4.") (options, args) = parser.parse_args() #============================================================================== # Print the title #============================================================================== version = '1.0' print_title('PdbSearcher.py', version) #============================================================================== # Read in th pdb file names from input file #============================================================================== #pdb file name list pdbfnl = [] #read the input file list fp = open(options.inputf, 'r') for line in fp: line = line.strip('\n').strip() pdbfnl.append(line) fp.close() #==============================================================================
iod, cn = get_IOD() print("This result of this cycle:") print(" Rmin/2=%5.3f (Angstrom), ep=%10.8f (Kcal/mol)" %(ion1.rmin, ion1.ep)) print(" HFE=%6.1f (Kcal/mol), IOD=%5.2f (Angstrom), CN=%3.1f" %(dG, iod, cn)) print(" Exp:HFE=%6.1f (Kcal/mol), IOD=%5.2f (Angstrom)" %(HFE_VAL, IOD_VAL)) #----------------------------------------------------------------------------# # Main Program # #----------------------------------------------------------------------------# parser = OptionParser("usage: -i inputfile") parser.add_option("-i", dest="inputf", type='string', help="Input file name") (options, args) = parser.parse_args() print_title('IPMach.py', 1.0) #---------------------------Default values------------------------------------ # About the program and steps of TI running prog = 'sander' cpus = 2 gpus = 0 mode = 'normal' TIsteps = 2 rev = 1 ti_windows = 7 ti_vdw_windows = 3 ti_chg_windows = 7 # About the running type