Utils#

class openmicron.utils.parser_ninfo.ParserNinfo[source]#
aicg13_ang_array_to_pd()[source]#

To make aicg13 angles array to tabular format

aicg_dihd_array_to_pd()[source]#

To make aicg dihedral angles array to tabular format

bonds_array_to_pd()[source]#

To make protein bonds array to tabular format

convert_str_to_number_array(para_array, int_ini_idx, int_end_idx, float_ini_idx, float_end_idx)[source]#
get_ninfo(ninfo_file_path)[source]#

get the native information in tabular format

harm_ang_array_to_pd()[source]#

To make harmonic angles array to tabular format

native_dihd_array_to_pd()[source]#

To make native dihedral angles array to tabular format

native_pair_array_to_pd()[source]#

To make native pairs array to tabular format

parser_ninfo(ninfo_file_path)[source]#

The method parser native information file.

Parameter: str

the path of native information file.

class openmicron.utils.parser_flp_para.parser_flp_para[source]#
correct_flex_ang_force_para(num_bin: int, para, stepsize=0.0001)[source]#
cubic_spline(theta, theta_lo, theta_hi, y_lo, y_hi, y2_lo, y2_hi)[source]#

The Cubic spline function.

Parameters:
  • theta (float) – angle

  • theta_lo (float) – the low limit of theta

  • theta_hi (float) – the high limit of theta

  • y_lo (float) – the energy value correspond to theta_lo

  • y_hi (float) – the energy value correspond to theta_hi

  • y2_lo (float) – the second-order derivative value of energy correspond to theta_lo

  • y2_hi (float) – the second-order derivative value of energy correspond to theta_hi

Returns:

energy – the energy of flexible local angle

Return type:

float

diff_cubic_spline(theta, theta_lo, theta_hi, y_lo, y_hi, y2_lo, y2_hi)[source]#
flexi_dihd_energy(theta, para)[source]#
get_corr_flex_ang_para(path)[source]#

Obtain the corrected flexible local potential parameters for the bond angle and dihedral angle of any residue

read_flexible_local_para(path)[source]#

read the parameter file of flexible local potential

Parameters:

path (str,) – The path of flexible local potential parameter file.ls

Returns:

  • flp_dihd (dictionary, float) – This parameters are used to describe the virtural dihedral angle in the disorder region. Each residue pair has a specific set of parameters. From the first column onwards, These parameters correspond to the constant term C and coefficients c1, s1, c2, s2, c3, and s3 in the Fourier fitting formula. Fourier fitting formula: C+c1*cos(theta)+s1*sin(theta)+ c2*cos(2*theta)+s2*sin(2*theta)+ c3*cos(3*theta)+s3*sin(3*theta).

  • flp_ang_x (list, float) – the angle interval of cubic spline

  • flp_ang_y (dictionary, float, kj/(mol*radin)) – The y-value at the endpoint of the interval depends on the residue.

  • flp_ang_y2 (dictionary, float, kj/(mol*radin^2)) – The second derivative of spline interpolation corresponds to the angle at the interval endpoints.

set_flex_dihd_corr(para, stepsize=0.0001)[source]#
openmicron.utils.gene_psf(psf_file_name, top)[source]#

generate protein structure file for vmd

Parameters:
  • psf_file_name (str) – The file name of PSF.

  • top (topology) – The topology of OpenMM System.

openmicron.utils.parser_kh_params(path, kh_model_symbol, kh_epsilon_scale, T)[source]#

Reading kim-hummer potentail parameter file.

Parameters:
  • path (str) – Path name of parameter file.

  • kh_model_symbol (str) – The Kim-Hummer potential has six model parameters, which you can choose from A, B, C, D, E, and F.

  • kh_epsilon_scale (float) – The parameter scales the strength of lambda to generate epsilon value.

  • T (float) – Current simulation temperature.

Returns:

  • resi_type (string list) – 20 residue type

  • epsilon_KH (numpy.array) – The parameter array consists of a 21x21 matrix for epsilon values. The 20x20 section of the array represents the parameter matrix for the side chain bead (CB) residue types, while the 21st row and 21st column represent the parameters for the central atom (CA).

  • sigma_KH (numpy.array) – The parameter array consists of a 21x21 matrix for sigma values. The 20x20 section of the array represents the parameter matrix for the side chain bead (CB) residue types, while the 21st row and 21st column represent the parameters for the central atom (CA).

openmicron.utils.parser_exv_params(path)[source]#

Reading excluded potential parameters.

Parameters:

path (str) – The name of path

Returns:

exv_params – exv_params include the following keywords: “SIGMA”, “xv_cutoff” and “exv_coef”.

Return type:

dictionary

class openmicron.utils.redefinetop.RedefineTopology[source]#
get_mini_component_set(chains)[source]#

To get minimal component set

Parameters:

top (topology) – The topology of OpenMM System.

Returns:

num_mini_set – The number of minimal component set.

Return type:

int

redefine_bond(top, bonds)[source]#

To redefine the bonds in topology.

Parameters:
  • top (topology) – The topology of OpenMM System.

  • bonds (bond) – bonds in system.

Returns:

top

Return type:

openmm topology