MCPcopy Index your code
hub / github.com/DunbrackLab/IPSAE / calc_d0_array

Function calc_d0_array

ipsae.py:126–136  ·  view source on GitHub ↗
(L, pair_type)

Source from the content-addressed store, hash-verified

124 return max(min_value, d0)
125
126def calc_d0_array(L, pair_type):
127 # Convert L to a NumPy array if it isn't already one (enables flexibility in input types)
128 # fixed 01.03.2026: now returns 1.00 instead of 1.04 for minimum value
129 L = np.array(L, dtype=float)
130 L = np.maximum(26,L)
131 min_value=1.0
132
133 if pair_type=='nucleic_acid': min_value=2.0
134
135 # Calculate d0 using the vectorized operation
136 return np.maximum(min_value, 1.24 * (L - 15) ** (1.0/3.0) - 1.8)
137
138
139# Define the parse_atom_line function for PDB lines (by column) and mmCIF lines (split by white_space)

Callers 1

ipsae.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected