def get_parameters(cls, forcefield, water_model): if forcefield == "charmm": prms = [ "par_all36m_prot.prm", "par_all36_cgenff.prm", "par_all36_lipid.prm", "par_all36_carb.prm", "par_all36_na.prm", "toppar_all36_prot_na_combined.str" ] if water_model == "tip3": prms.append("toppar_water_ions.str") elif water_model == "tip4e": prms.append("toppar_water_ions_tip4p_ew.str") elif water_model == "spce": prms.append("toppar_water_ions_spc_e.str") elif forcefield == "amber": from dabble.param import AmberWriter # avoid circular dependency return AmberWriter.get_parameters(forcefield, water_model) elif forcefield == "opls": prms = ["opls_aam.prm"] if water_model != "tip3": raise DabbleError("Only TIP3 water model supported for OPLS") else: raise ValueError("Invalid forcefield: '%s'" % forcefield) return [cls._get_forcefield_path(par) for par in prms]
def get_parameters(cls, forcefield, water_model): """ Get the path to GROMACS-format parameter files for a given force field """ # Amber and Charmm handled by converstion if forcefield == "charmm": return CharmmWriter.get_parameters(forcefield, water_model) if forcefield == "amber": return AmberWriter.get_parameters(forcefield, water_model) if forcefield == "opls": return CharmmWriter.get_parameters(forcefield, water_model) # Gromacs topologies and parameters are the same directories return GromacsWriter.get_topologies(forcefield, water_model)