MDAnalysis
Create a pseudo box for PDB files and the shifting of coordinates within that box.
mda_psuedobox_from_atomgroup ¶
mda_psuedobox_from_atomgroup(ag, cutoff=5.0)
Construct a pseudo box and shifts atomic coordinates to fit within this box.
This function takes an AtomGroup object and a cutoff distance as input, and it creates a pseudo box large enough to include all atoms plus the specified cutoff. It then shifts the coordinates of the atoms to fit within this box.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ag |
AtomGroupType
|
An AtomGroup object representing the group of atoms for which the pseudo box is to be created. |
required |
cutoff |
float
|
The minimum distance that should be allowed between the edges of the pseudo box and the atoms. Default is 5.0. |
5.0
|
Returns:
Type | Description |
---|---|
tuple[NDArray[float32], NDArray[float32]]
|
tuple[NDArray[np.float32], NDArray[np.float32]]: The shifted coordinates of the atoms and the dimensions of the pseudo box. |
Source code in lahuta/utils/mda.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|