schrodinger.test.stu.fep_command_utils module

schrodinger.test.stu.fep_command_utils.EMPTY_FUNC_W_ARG(x)

Function version of lambda x: None, used as a default value for Callable inputs.

class schrodinger.test.stu.fep_command_utils.FepJobTools(ui_func: Callable, generate_func: Callable, extra_args_dict: Dict[str, str])

Bases: object

Class to encompass relevant aspects of job preparation for a certain FEP command.

Variables
  • ui_func – the ui command associated with launching the fep job

  • generate_func – the generate command associated with launching the fep job

  • extra_args_dict – any additional arguments generally used to launch the given fep command

ui_func: Callable
generate_func: Callable
extra_args_dict: Dict[str, str]
__init__(ui_func: Callable, generate_func: Callable, extra_args_dict: Dict[str, str]) None
class schrodinger.test.stu.fep_command_utils.StuMsjParser(msj_path: pathlib.Path)

Bases: object

Class that stores a multisim.Msj object, and provides methods to replace parts of the associated MSJ for improved STU testing, as well as the ability to write those changes back to the msj file.

Variables
  • msj (multisim.Msj) – an MSJ object returned by multisim.parse, associated with a single .msj file

  • msj_path (str) – the name of the read msj file, which the msj object is also written to on calls to write

__init__(msj_path: pathlib.Path)
find_all_stages(stage_name: str) Tuple[schrodinger.utils.sea.sea.Map]

Return a tuple containing all of the stages with the given name in the parser, in the form of sea.Map objects.

Parameters

stage_name – the name of the stage to search for

Returns

a tuple containing all of the found stages

check_and_update_time(stage: schrodinger.utils.sea.sea.Map, time_replacement_map: Dict[str, str])

Extracts the value from the given stage’s time parameter (which is stored as a sea.Atom object), and returns its shortened value, for a STU run.

Parameters
  • stage – the given stage to modify

  • time_replacement_map – maps default time values written to an msj to shortened ones for a STU run for a given stage

check_and_update_trajectory_interval(stage: schrodinger.utils.sea.sea.Map)

Check if the given stage contains a trajectory with an interval of 240ps and shorten it if it does.

Parameters

stage – the given msj stage to check

check_and_update_lambda_hopping_energy_group_settings(lambda_hopping_stage: schrodinger.utils.sea.sea.Map)

Modify the energy group settings if the given lambda_hopping stage contains one.

Parameters

lambda_hopping_stage – the specific lambda_hopping_stage from the parser

update_fep_analysis()

Find and modify the FepAnalysis of the current msj file.

update_desmond_extend()

Set the desmond_extend stage added_time parameter to a low default value if the desmond_extend stage is present.

write()
schrodinger.test.stu.fep_command_utils.prepare_fep_command(fep_executable: schrodinger.test.stu.fep_stu_constants.FEPExecutable, jobname: str, input_file: str, updated_and_extra_args: Optional[Dict[str, str]] = None, extend: bool = False) List[str]

Generalized command for creating and returning a command for an FEP job.

Parameters
  • fep_executable – the type of FEP job you would like to run

  • jobname – the name of the job that will be run

  • input_file – the input file to the FEP job, which can be any of the valid FEP file formats

  • updated_and_extra_args – a dictionary containing any changes to DEFAULT_ARGS as well as additional command arguments

  • extend – whether the command generated is for an extend run

Returns

a command line command as a list, in subprocess executable form

schrodinger.test.stu.fep_command_utils.update_msjs()

Parse the output msj files from the generation stage of an FEP launch, and modify settings to allow for faster calculations to be run for STU testing purposes.

schrodinger.test.stu.fep_command_utils.update_extend_msjs()