psize
Get dimensions and other information from a PQR file.
Todo
This code could be combined with inputgen
.
Todo
This code should be moved to the APBS code base.
Code author: Dave Sept
Code author: Nathan Baker
Code author: Todd Dolinksy
Code author: Yong Huang
- pdb2pqr.psize.CFAC = 1.7
The fine grid dimensions are multiplied by this constant to calculate the coarse grid dimensions
- pdb2pqr.psize.FADD = 20.0
The number of Angstroms added to the molecular dimensions to determine the find grid dimensions
- pdb2pqr.psize.GMEMCEIL = 400
Maxmimum memory (in MB) to be used for a calculation
- pdb2pqr.psize.GMEMFAC = 200
Approximate memory usage (in bytes) can be estimated by multiplying the number of grid points by this constant
- pdb2pqr.psize.OFRAC = 0.1
The fractional overlap between grid partitions in a parallel focusing calculation
- class pdb2pqr.psize.Psize(cfac=1.7, fadd=20.0, space=0.5, gmemfac=200, gmemceil=400, ofrac=0.1, redfac=0.25)[source]
Class for parsing input files and suggesting settings.
- __init__(cfac=1.7, fadd=20.0, space=0.5, gmemfac=200, gmemceil=400, ofrac=0.1, redfac=0.25)[source]
Initialize.
- Parameters:
cfac (float) – factor by which to expand molecular dimensions to get coarse grid dimensions
fadd (float) – amount (in Angstroms) to add to molecular dimensions to get the fine grid dimensions
space (float) – desired fine mesh resolution (in Angstroms)
gmemfac (float) – number of bytes per grid point required for a sequential multigrid calculation
gmemceil (float) – maximum memory (in MB) allowed for sequential multigrid calculation. Adjust this value to force the script to perform faster calculations (which require more parallelism).
ofrac (float) – overlap factor between mesh partitions in parallel focusing calculation
redfac (float) – the maximum factor by which a domain dimension can be reduced during focusing
- parse_input(filename)[source]
Parse input structure file in PDB or PQR format.
- Parameters:
filename (str) – string with path to PDB- or PQR-format file.
- parse_lines(lines)[source]
Parse the PQR/PDB lines.
Todo
This is messed up. Why are we parsing the PQR manually here when we already have other routines to do that? This function should be replaced by a call to existing routines.
- Parameters:
lines ([str]) – PDB/PQR lines to parse
- parse_string(structure)[source]
Parse the input structure as a string in PDB or PQR format.
- Parameters:
structure (str) – input structure as string in PDB or PQR format.
- run_psize(filename)[source]
Parse input PQR file and set parameters.
- Parameters:
filename (str) – path of PQR file
- set_fine_grid_points(fine_length)[source]
Compute mesh grid points, assuming 4 levels in multigrid hierarchy.
Todo
remove hard-coded values from this function.
- set_focus(fine_length, nproc, coarse_length)[source]
Calculate the number of levels of focusing required for each processor subdomain.
- set_length(maxlen, minlen)[source]
Compute molecular dimensions, adjusting for zero-length values.
Todo
Replace hard-coded values in this function.
- set_proc_grid(ngrid, nsmall)[source]
Calculate the number of processors required in a parallel focusing calculation to span each dimension of the grid given the grid size suitable for memory constraints.
- set_smallest(ngrid)[source]
Set smallest dimensions.
Compute parallel division of domain in case the memory requirements for the calculation are above the memory ceiling. Find the smallest dimension and see if the number of grid points in that dimension will fit below the memory ceiling Reduce nsmall until an nsmall^3 domain will fit into memory.
Todo
Remove hard-coded values from this function.
- pdb2pqr.psize.REDFAC = 0.25
The maximum factor by which a domain can be “shrunk” during a focusing calculation
- pdb2pqr.psize.SPACE = 0.5
Desired fine grid spacing (in Angstroms)