schrodinger.application.livedesign.ld_utils2 module

schrodinger.application.livedesign.ld_utils2.get_sha1(file_path)

Return the SHA1 hash of a specified file. If no file path is provided, return None.

Parameters:file_path (str or None) – the path to a file, or None
Returns:the SHA1 hash of the file located at file_path, or None
Return type:str or None
schrodinger.application.livedesign.ld_utils2.get_round_trip_hash(st)

Return a hash of relevant structure and host data. This will be used to determine whether structures imported from LiveDesign can be exported back to LiveDesign using corporate ID (vs. structure) matching.

Parameters:st (structure.Structure) – a structure
Returns:a hash value related to the provided structure
Return type:str
schrodinger.application.livedesign.ld_utils2.apply_round_trip_hash(st)

Store a structure-dependent hash as a property on this structure.

Parameters:st (structure.Structure) – a structure
schrodinger.application.livedesign.ld_utils2.st_matches_round_trip_hash(st)

Determine whether the supplied structure can be exported again using the stored “round-trip” corporate ID value.

This can only be done if
  1. The structure was originally imported from the same LD host that it
    is not being exported to.
  2. The SMILES/stereochemistry of the structure has not changed since
    being imported.
Parameters:st (structure.Structure) – a structure
Returns:whether the round trip hash value stored on this structure matches a newly-generated hash
Return type:bool