Various miscellaneous functions
amoptd_fix_path
(optd, newroot)[source]¶Update all the paths in an AMPLE results dictionary to be rooted at newroot
Parameters: |
---|
disable_logging
(*args, **kwds)[source]¶A context manager to disable logging within a block.
Parameters: |
|
---|
extract_tar
(archive, directory=None, filenames=None, suffixes=None)[source]¶Extract one or more files from a tar file into a specified directory
Parameters: | |
---|---|
Returns: | A list of the extracted files |
Return type: |
filename_append
(filename=None, astr=None, directory=None, separator='_')[source]¶Append astr to filename, before the suffix, and return the new filename.
ideal_helices
(optd)[source]¶Get some ideal helices
Parameters: | nresidues (int) – Number of residues to be used |
---|---|
Returns: |
|
is_exe
(fpath)[source]¶Check if an executable exists
Parameters: | fpath (str) – The path to the executable |
---|---|
Returns: | |
Return type: | bool |
is_file
(fpath)[source]¶Check if a file exists
Parameters: | fpath (str) – The path to the file |
---|---|
Returns: | |
Return type: | bool |
make_workdir
(run_dir, ccp4i2=False, MAX_WORKDIRS=100)[source]¶Make a work directory rooted at run_dir and return its path
Parameters: | |
---|---|
Returns: | work_dir – The path to the working directory |
Return type: |
read_amoptd
(amoptd_fname)[source]¶Read a PICKLE-formatted AMPLE options file
Parameters: | amoptd_fname (str) – The path to the PICKLE-formatted AMPLE options file |
---|---|
Returns: | amoptd – AMPLE options from saved state |
Return type: | dict |
run_command
(cmd, logfile=None, directory=None, dolog=True, stdin=None, check=False, **kwargs)[source]¶Execute a command and return the exit code.
Parameters: |
|
---|---|
Returns: | returncode – Subprocess exit code |
Return type: |
Notes
We take care of outputting stuff to the logs and opening/closing logfiles
saveAmoptd
(*args)[source]¶Save AMPLE options to a PICKLE-formatted file
See also
Warning
This function was deprecated and will be removed in future releases. Please use save_amoptd()
instead.
save_amoptd
(amoptd)[source]¶Save AMPLE options to a PICKLE-formatted file
Parameters: | amoptd (dict) – AMPLE options from saved state |
---|
tmpFileName
()[source]¶Return a filename for a temporary file
See also
Warning
This function was deprecated and will be removed in future releases. Please use tmp_file_name()
instead.