Trees | Indices | Help |
|
---|
|
A module of file utilities to deal with common file issues.
NOTE: This module is used in scripts that need to be able to run without a Schrodinger license, and therefore can't depend on the pymmlibs.
The force_remove and force_rename functions deal with the fact that os.remove() and os.rename() don't work on Windows if write permissions are not enabled.
|
|||
chdir A context manager that carries out commands inside of the specified directory and restores the current directory when done. |
|
|||
|
|||
|
|||
|
|||
a tuple containing two strings |
|
||
|
|||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
str |
|
||
|
|||
str |
|
||
str |
|
||
str |
|
||
str or None |
|
||
str |
|
||
str (Windows) or None (Linux and MacOSX) |
|
||
str |
|
||
str |
|
||
str |
|
||
str |
|
||
str or None |
|
||
str |
|
||
str or None |
|
||
list |
|
||
|
|
|||
_winreg = None hash(x) |
|||
fsenc =
|
|||
EXTENSIONS =
|
|||
CSIDL =
|
|||
APPDATA = 1
|
|||
DESKTOP = 5
|
|||
DOCUMENTS = 6
|
|||
HOME = 0
|
|||
LOCAL_APPDATA = 2
|
|||
MAESTRO =
|
|||
MOL2 =
|
|||
NETWORK = 7
|
|||
PDB =
|
|||
SD =
|
|||
SMILES =
|
|||
SMILESCSV =
|
|||
TEMP = 4
|
|||
USERDATA = 3 hash(x) |
|||
__package__ =
|
|
Remove the file 'filename' in a platform independent way without an exception, regardless of presence of the file or the lack of write permission.
|
Remove the directory 'dirname', using force_remove to remove any difficult to remove files or sub-directories.
|
Rename a file, even if a file at the new name exists, and even if that file doesn't have write permission, and even if old and new are on different devices.
Note: Renaming may not be an atomic operation. If the 'new' file exists then it is first removed then renamed in two operations. Similarly, if old and new are not on the same device then the file is copied to 'new' then the 'old' file is removed. |
Split the extension from a pathname. Returns "(root, ext)". Equivalent to os.path.splitext(), except that for gzip compressed files, such as *.mae.gz files, ".mae.gz" is split off instead of ".gz". *.sdf.gz, *.sd.gz, *.mol.gz
|
Return the format of a structure file, based on the filename extension. None is returned if the file extension is not recognized. |
Returns True if specified filename represents a Maestro file.
|
Returns True if specified filename represents a SD file.
|
Returns True if specified filename represents a CSV file.
|
Returns True if specified filename represents a Smiles file.
|
Returns True if specified filename represents a Maestro PoseViewer file. Checks if the filename ends with *_pv.mae, *_pv.maegz, *_pv.mae.gz, etc.
|
Returns a job name derived from the specified filename. Same as get_basename(), except that illegal characters are removed. |
Return next filename prefix in series <root><midfix><number>. Given a path (absolute or relative) to a filename or filename prefix, return the next prefix in the sequence implied by path and midfix. For example, with a path of /full/path/to/foo.mae, path/to/foo.mae or foo.mae, or /full/path/to/foo, path/to/foo or foo, and a midifix of '-', this function will return "foo-3" if any file whose prefix foo-2 (and no higher-numbered foo-*) is present. It will return foo-1 if no file whose prefix is foo-<number> is present. The net effect is that any file-name extension in the path argument will be ignored. This function differs from next_filename() in that here, all files sharing the prefix contained in the path are searched, regardless of extension, and the next filename prefix is returned. The search is case sensitive or not depending on the semantics of the file system. The leading directory of the path, if any, is included in the return value. Usage note: you might use this when the filename prefix could be exhibited by many files and you don't want to overwrite any of them. For example, you are starting up a job which will create many files with the same prefix. |
Return next filename in series <root><midfix><number>.<ext>. Given a path (absolute or relative) to a filename, return the next filename in the sequence implied by path and midfix. For example, with a path of /full/path/to/foo.mae, path/to/foo.mae or foo.mae and a midifix of '-', this function will return "foo-3.mae" if file foo-2.mae (and no higher-numbered foo-*.mae )is present. It will return foo-1.mae if no file named foo-<number>.mae is present. This function differs from next_filename_prefix() in that here, only files with the specified extension are searched, and the next full filename is retured. The search is case sensitive or not depending on the semantics of the file system. The leading directory of the path, if any, is included in the return value. Usage note: You might use this when you are expecting to update only a single file: the one whose filename is given in the path. For example, you are exporting structures to a .mae file and you want to pick a non-conflicting name based on a user's filename specification. |
This function returns the schrodinger specific directory. If an invalid which_directory is specified, then a ValueError is thrown.
|
Deprecated: Because this function behaves in a non-standard way by returning an mmlib status, get_directory_path is preferred. |
Return the current user's home directory. Under Unix, this is the directory specified by $HOME, or else the home directory recorded in the system password database. Linux: ~/ MacOSX: ~/ Windows: $HOME or CSIDL_PROFILE
|
Return the directory for storing schrodinger application data that can be shared. Linux: ~/.schrodinger MacOSX: ~/.schrodinger Windows: CSIDL_APPDATA/Schrodinger
|
Return the directory for storing schrodinger application data that is local to the current machine. Linux: ~/.schrodinger Windows: CSIDL_LOCAL_APPDATA/Schrodinger
|
Return the user's desktop directory. Linux: ~/Desktop (if it exists) MacOSX: ~/Desktop (if it exists) Windows: CSIDL_DESKTOP
|
Return the directory where user documents are stored by default. Linux: ~/ MacOSX: ~/Documents Windows: CSIDL_PERSONAL
|
Linux: None MacOSX: None Windows: CSIDL_NETHOOD
|
Return the directory for storing user data files, like config files. Linux: ~/.schrodinger MacOSX: ~/.schrodinger Windows: CSIDL_PROFILE/Schrodinger
|
Return the directory for creating temporary job directories and other temporary files. Creates the directory if it does not exist. Linux: $SCHRODINGER_TMPDIR or ~/.schrodinger/tmp MacOSX: $SCHRODINGER_TMPDIR or ~/.schrodinger/tmp Windows: $SCHRODINGER_TMPDIR or CSIDL_LOCAL_APPDATA/Schrodinger/tmp
|
Return the default startup directory for Schrodinger applications that aren't started from the commandline. Linux: ~/ Darwin: ~/Documents/Schrodinger Windows: CSIDL_PERSONAL/Schrodinger
|
|
Check for platform-specific executable file or script in the directory path provided.
|
Find out pymol installation path under given keypath and keyname. Check for standard pymol programs and return pymol_launch_command path.
Note: Any exception encountered during registry lookup results in None being returned |
Find the executable or script we use to launch PyMOL.
|
Get a cmd list for launching Pymol. This may include extra platform- specific arguments.
|
Create a hard link pointing to source named link_name. On Windows, uses CreateHardLinkA() and will raise RuntimeError() on failure. On other OSes uses os.link(), and will raise OSError on failure. |
|
EXTENSIONS
|
CSIDL
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Aug 6 04:50:22 2015 | http://epydoc.sourceforge.net |