Bsoft 2.1.4
Bernard's software package
rwresprop.cpp File Reference

Library routines to read and write residue properties. More...

#include "rwresprop.h"
#include "star.h"
#include "mol_tags.h"
#include "seq_util.h"
#include "linked_list.h"
#include "utilities.h"

Classes

struct  resprop
 

Functions

Bresidue_typeresidue_type_add (Bresidue_type **rtype, char c)
 
Bresidue_typeread_residue_prop_star (Bstring &filename)
 
Bresidue_typeread_residue_properties (Bstring &filename)
 
int write_residue_prop_star (Bstring &filename, Bresidue_type *rt)
 
Bresidue_matrixread_residue_mat_star (Bstring &filename)
 
Bresidue_typeget_residue_properties (Bstring &filename)
 Reading residue properties from parameter files. More...
 
int write_residue_properties (Bstring &filename, Bresidue_type *rt)
 Writing residue properties from a parameter file. More...
 
Bresidue_matrixget_residue_matrix (Bstring &filename)
 Reading a residue matrix from a file. More...
 
int residue_matrix_kill (Bresidue_matrix *resmat)
 Deallocating a residue matrix. More...
 

Variables

int verbose
 
struct resprop defaultprops []
 
char defaultcode [] = "-*ABCDEFGHIKLMNPQRSTVWXYZ"
 
float defaultsim []
 

Detailed Description

Library routines to read and write residue properties.

Author
Bernard Heymann
Date
Created: 19991114
Modified: 20210328

Function Documentation

◆ get_residue_matrix()

Bresidue_matrix * get_residue_matrix ( Bstring filename)

Reading a residue matrix from a file.

Parameters
&filenamefile name.
Returns
Bresidue_matrix* residue matrix property structure, NULL on failure.

◆ get_residue_properties()

Bresidue_type * get_residue_properties ( Bstring filename)

Reading residue properties from parameter files.

Parameters
&filenamefile name.
Returns
Bresidue_type* the residue property structure, NULL on failure.

◆ read_residue_mat_star()

Bresidue_matrix * read_residue_mat_star ( Bstring filename)

◆ read_residue_prop_star()

Bresidue_type * read_residue_prop_star ( Bstring filename)

◆ read_residue_properties()

Bresidue_type * read_residue_properties ( Bstring filename)

◆ residue_matrix_kill()

int residue_matrix_kill ( Bresidue_matrix resmat)

Deallocating a residue matrix.

Parameters
*resmatthe residue matrix property structure.
Returns
int 0.

◆ residue_type_add()

Bresidue_type * residue_type_add ( Bresidue_type **  rtype,
char  c 
)

◆ write_residue_prop_star()

int write_residue_prop_star ( Bstring filename,
Bresidue_type rt 
)

◆ write_residue_properties()

int write_residue_properties ( Bstring filename,
Bresidue_type rt 
)

Writing residue properties from a parameter file.

Parameters
&filenamefile name.
*rtthe residue property structure.
Returns
int error code (<0 means failure).

Variable Documentation

◆ defaultcode

char defaultcode[] = "-*ABCDEFGHIKLMNPQRSTVWXYZ"

◆ defaultprops

struct resprop defaultprops[]
Initial value:
= {
{'-', 0.00, 0.0, 0.0, 0.00, 0.0, 0.0},
{'*', 0.00, 0.0, 0.0, 0.00, 0.0, 0.0},
{'A', 89.09, 89.0, 3.4, 0.10, 0.0, -1.6},
{'B', 132.61, 118.0, 5.5, 0.50, -0.5, 7.0},
{'C', 121.15, 103.0, 4.4, 0.24, 0.0, -2.0},
{'D', 133.10, 114.0, 5.5, 0.50, -1.0, 9.2},
{'E', 147.13, 139.0, 6.1, 0.50, -1.0, 8.2},
{'F', 165.19, 199.0, 6.7, 0.32, 0.0, -3.7},
{'G', 75.07, 64.0, 2.3, 0.07, 0.0, -1.0},
{'H', 155.16, 157.0, 6.0, 0.50, 0.5, 3.0},
{'I', 131.17, 163.0, 5.1, 0.22, 0.0, -3.1},
{'K', 146.19, 165.0, 6.7, 0.50, 1.0, 8.8},
{'L', 131.17, 163.0, 5.5, 0.20, 0.0, -2.8},
{'M', 149.21, 166.0, 6.1, 0.45, 0.0, -3.4},
{'N', 132.12, 122.0, 5.5, 0.50, 0.0, 4.8},
{'P', 115.13, 122.0, 4.4, 0.50, 0.0, 0.2},
{'Q', 146.15, 147.0, 6.1, 0.50, 0.0, 4.1},
{'R', 174.23, 191.0, 7.3, 0.50, 1.0, 12.0},
{'S', 105.09, 94.0, 4.4, 0.50, 0.0, -0.6},
{'T', 119.12, 120.0, 4.5, 0.50, 0.0, -1.2},
{'V', 117.15, 138.0, 4.5, 0.12, 0.0, -2.6},
{'W', 204.23, 226.0, 7.4, 0.61, 0.0, -1.9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