def setUpClass(cls): cls.json_input = DictLammpsInput.from_file( "NVT", os.path.join(test_dir, "NVT.json"), data_filename=os.path.join(test_dir, "nvt.data"), is_forcefield=True) cls.lammps_input = DictLammpsInput.from_file( "peptide", os.path.join(test_dir, "in.peptide"), lammps_data=os.path.join(test_dir, "data.peptide"), data_filename="data.peptide", is_forcefield=True)
def wf_from_input_template(input_template_file, lammps_data, data_filename, user_settings, is_forcefield=False, input_filename="lammps.inp", lammps_bin="lammps", db_file=None, dry_run=False): """ Returns workflow where the input file parameters are set from the give json template file. Args: input_template_file: json template input file lammps_data (string/LammpsData/LammpsForceFieldData): path to the data file or an appropriate object data_filename (string): name of the the lammps data file user_settings (dict): User lammps settings is_forcefield (bool): whether the data file has forcefield and topology info in it. This is required only if lammps_data is a path to the data file instead of a data object input_filename (string): input file name lammps_bin (string): path to the lammps binary db_file (string): path to the db file dry_run (bool): for test purposes, decides whether or not to run the lammps binary with the input file. Returns: Workflow """ wf_name = "LAMMPS Wflow from input template {}".format(input_template_file) lammps_dict_input = DictLammpsInput.from_file(wf_name, input_template_file, lammps_data=lammps_data, data_filename=data_filename, user_lammps_settings=user_settings, is_forcefield=is_forcefield) return get_wf(wf_name, lammps_dict_input, input_filename=input_filename, lammps_bin=lammps_bin, db_file=db_file, dry_run=dry_run)
def wf_from_input_template(input_template_file, lammps_data, data_filename, user_settings, is_forcefield=False, input_filename="lammps.inp", lammps_bin="lammps", db_file=None, dry_run=False): """ Returns workflow where the input file parameters are set from the give json template file. Args: input_template_file: json template input file lammps_data (string/LammpsData/LammpsForceFieldData): path to the data file or an appropriate object data_filename (string): name of the the lammps data file user_settings (dict): User lammps settings is_forcefield (bool): whether the data file has forcefield and topology info in it. This is required only if lammps_data is a path to the data file instead of a data object input_filename (string): input file name lammps_bin (string): path to the lammps binary db_file (string): path to the db file dry_run (bool): for test purposes, decides whether or not to run the lammps binary with the input file. Returns: Workflow """ wf_name = "LAMMPS Wflow from input template {}".format(input_template_file) lammps_dict_input = DictLammpsInput.from_file( wf_name, input_template_file, lammps_data=lammps_data, data_filename=data_filename, user_lammps_settings=user_settings, is_forcefield=is_forcefield) return get_wf(wf_name, lammps_dict_input, input_filename=input_filename, lammps_bin=lammps_bin, db_file=db_file, dry_run=dry_run)
def setUpClass(cls): cls.lammps_input = DictLammpsInput.from_file( "NVT", os.path.join(test_dir, "NVT.json"), data_file=os.path.join(test_dir, "nvt.data"), is_forcefield=True)
def setUpClass(cls): cls.lammps_input = DictLammpsInput.from_file( "NVT", os.path.join(test_dir, "NVT.json"), data_filename=os.path.join(test_dir, "nvt.data"), is_forcefield=True)