def readAmber12SB(main_file = None, mod_files = None): global Amber12SB if main_file is None and mod_files is None: if Amber12SB is None: paramfile = os.path.join(this_directory, "parm10.dat") modfile = os.path.join(this_directory, "frcmod.ff12SB") Amber12SB = AmberData.AmberParameters(paramfile, [(modfile, 'MOD4')]) Amber12SB.lennard_jones_1_4 = 0.5 Amber12SB.electrostatic_1_4 = 1./1.2 Amber12SB.default_ljpar_set = Amber12SB.ljpar_sets['MOD4'] Amber12SB.atom_type_property = 'amber12_atom_type' Amber12SB.charge_property = 'amber_charge' return Amber12SB else: if main_file is None: main_file = os.path.join(this_directory, "parm10.dat") mod_files = [(fullModFilePath(mf), 'MOD4') for mf in mod_files] mod_files.insert(0, (os.path.join(this_directory, "frcmod.ff12SB"), 'MOD4')) params = AmberData.AmberParameters(main_file, mod_files) params.lennard_jones_1_4 = 0.5 params.electrostatic_1_4 = 1./1.2 params.default_ljpar_set = params.ljpar_sets['MOD4'] params.atom_type_property = 'amber12_atom_type' params.charge_property = 'amber_charge' return params
def readAmber99(main_file=None, mod_files=None): global Amber99 if main_file is None and mod_files is None: if Amber99 is None: paramfile = os.path.join(this_directory, "parm99.dat") Amber99 = AmberData.AmberParameters(paramfile) Amber99.lennard_jones_1_4 = 0.5 Amber99.electrostatic_1_4 = 1. / 1.2 Amber99.default_ljpar_set = Amber99.ljpar_sets['MOD4'] Amber99.atom_type_property = 'amber_atom_type' Amber99.charge_property = 'amber_charge' return Amber99 else: if main_file is None: main_file = os.path.join(this_directory, "parm99.dat") if mod_files is None: mod_files = [] else: mod_files = map(lambda mf: (fullModFilePath(mf), 'MOD4'), mod_files) params = AmberData.AmberParameters(main_file, mod_files) params.lennard_jones_1_4 = 0.5 params.electrostatic_1_4 = 1. / 1.2 params.default_ljpar_set = params.ljpar_sets['MOD4'] params.atom_type_property = 'amber_atom_type' params.charge_property = 'amber_charge' return params
def readOPLS(main_file=None, mod_files=None): global OPLS if main_file is None and mod_files is None: if OPLS is None: paramfile = os.path.join(this_directory, "opls_parm.dat") OPLS = AmberData.AmberParameters(paramfile) OPLS.lennard_jones_1_4 = 0.125 OPLS.electrostatic_1_4 = 0.5 OPLS.default_ljpar_set = OPLS.ljpar_sets['OPLS'] OPLS.atom_type_property = 'opls_atom_type' OPLS.charge_property = 'opls_charge' return OPLS else: if main_file is None: main_file = os.path.join(this_directory, "opls_parm.dat") if mod_files is None: mod_files = [] else: mod_files = map(lambda mf: (fullModFilePath(mf), 'OPLS'), mod_files) params = AmberData.AmberParameters(main_file, mod_files) params.lennard_jones_1_4 = 0.125 params.electrostatic_1_4 = 0.5 params.default_ljpar_set = params.ljpar_sets['OPLS'] params.atom_type_property = 'opls_atom_type' params.charge_property = 'opls_charge' return params
def readAmber91(): global Amber91 if Amber91 is None: Amber91 = AmberData.AmberParameters(os.path.join(this_directory, "parm91.dat")) Amber91.lennard_jones_1_4 = 0.5 Amber91.electrostatic_1_4 = 0.5 Amber91.default_ljpar_set = Amber91.ljpar_sets['STDA'] Amber91.atom_type_property = 'amber91_atom_type' Amber91.charge_property = 'amber91_charge'
def readAmberFiles(main_file, std_mod_file, mod_files, atom_type_property, charge_property, with_gaff): main_file = os.path.join(this_directory, main_file) if mod_files is None: mod_files = [] else: mod_files = [(fullModFilePath(mf), 'MOD4') for mf in mod_files] if std_mod_file is not None: mod_files.insert(0, (os.path.join(this_directory, std_mod_file), 'MOD4')) params = AmberData.AmberParameters(main_file, mod_files) if with_gaff: gaff_params = AmberData.AmberParameters( os.path.join(this_directory, "gaff.dat"), []) params.merge(gaff_params) params.lennard_jones_1_4 = 0.5 params.electrostatic_1_4 = 1. / 1.2 params.default_ljpar_set = params.ljpar_sets['MOD4'] params.atom_type_property = atom_type_property params.charge_property = charge_property return params