Io
write_pdbs
¶
A class for converting numpy arrays into PDB-formatted strings.
__create_pdb_line(numpy_array, index, resname, letter)
¶
Create a string formatted according to the PDB standard.
PARAMETER | DESCRIPTION |
---|---|
|
A 1x3 np.array representing a 3D point.
|
|
An integer, the atom index to use in the string.
|
|
A string, the RESNAME to use.
|
|
A string, the atom name/chain/etc to use for the output.
|
RETURNS | DESCRIPTION |
---|---|
A string, formatted according to the PDB standard. |
numpy_to_pdb(narray, letter, resname='')
¶
Create a string formatted according to the PDB standard.
Args: narray: A nx3 np.array representing a 3D point. letter: A string, the atom name/chain/etc to use for the output. resname: An optional string, the RESNAME to use for the output.
Returns: A string, formatted according to the PDB standard.
create_pdb_line(numpy_array, index, resname, letter)
¶
dx_freq(freq_mat, output_prefix, config)
¶
Generates a DX file that records the frequency that a volume element is open.
PARAMETER | DESCRIPTION |
---|---|
|
a Nx4 matrix, where the first 3 columns are the x,y,z coords of the point, and the 4th column is the frequency of emptiness for that point in space
TYPE:
|
fix_filename(path, must_exist=True)
¶
Returns a standardized Path object, handling both Windows and Unix-formatted paths.
PARAMETER | DESCRIPTION |
---|---|
|
The file path to standardize.
TYPE:
|
|
If True, verifies that the path exists.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
FileNotFoundError
|
If the path does not exist and must_exist is True. |
ValueError
|
If the path format is invalid. |
RETURNS | DESCRIPTION |
---|---|
Path
|
A pathlib.Path object representing the standardized path.
TYPE:
|