3 using System.Collections.Generic;
26 List<float> BfactCAlist =
new List<float> ();
33 if(calist.Count > 2) {
38 float bfac = residlist[0];
41 for(
int i=1;i<residlist.Count;i++){
43 if(i+1 == residlist.Count){
45 BfactCAlist.Add (bfac);
48 if((atomsNameList[i-1] == atomsNameList[i]) && (residlist[i-1] == residlist[i])){
49 if (atomsNameList[i] ==
"CA"){
51 caChainlist.RemoveAt(j);
56 if(residlist[i-1] == residlist[i]){
63 BfactCAlist.Add (bfac);
72 minValue =
float.Parse (minval);
74 minValue =
GetMin(BfactCAlist);
77 for(
int i=0; i<BfactCAlist.Count;i++)
78 BfactCAlist[i] = BfactCAlist[i] - minValue;
84 maxValue = (
float.Parse (maxval) -
float.Parse (minval));
86 maxValue =
GetMax(BfactCAlist);
90 for(
int i=0; i<BfactCAlist.Count;i++){
91 BfactCAlist[i] = BfactCAlist[i]/
maxValue;
115 for (
int k=0; k<calist.Count; k++) {
132 minval = minValue.ToString ();
133 maxval = (maxValue+
minValue).ToString ();
140 else if (BFValue <0.2)
142 else if (BFValue <0.3)
144 else if (BFValue <0.4)
146 else if (BFValue <0.5)
148 else if (BFValue <0.6)
150 else if (BFValue <0.7)
152 else if (BFValue <0.8)
154 else if (BFValue <0.9)
166 public static float GetMin (List<float> ListValues){
167 float mymin = ListValues[0];
168 foreach (
float g
in ListValues)
179 public static float GetMax (List<float> ListValues){
180 float mymax = ListValues [0];
181 foreach (
float f
in ListValues)
static List< int[]> CreateBondsList_HiRERNA(List< string > atomnames)
static List< int[]> bondCAList
The bonds between carbon alpha in the CA-Spline.
static List< string > backupCaChainList
static List< int[]> CreateBondsCAList(List< string > caChainlist)
Creates a bond list for the carbon alpha splines.
List< float > InputBfactArray
static void CreateBFRep()
List< float[]> InputKeyNodes
static AtomModel GetModel(string type)
void CalculateSplineArray()
static List< int[]> CreateBondsEPList(List< float[]> atomsLocationlist, List< AtomModel > atomsTypelist)
static List< string > atomsNamelist
The name of each atom.
static List< AtomModel > atomsTypelist
The type of each atom.
static List< int > residueIds
The residue identifiers.
static List< float > backupBfactCAList
static List< float > BFactorList
Bfactor of each atom.
static float GetMax(List< float > ListValues)
Find the max value of a list of float.
static bool isRescale
When true, triggers the B factor value rescaling.
static List< string > backupCaSplineChainList
Sometimes inside pdbs lists are not sorted, and residues mixed So I had to create this list to sort r...
static List< float[]> CaSplineList
The coordinates of each Carbon alpha in the CA-Spline.
!WiP Includes FLAGS of GUI.
static string GetBFStyle(float BFValue)
static List< string > CaSplineChainList
The chain of each carbon alpha in the CA-Spline.
static List< float[]> backupCaList
static List< int[]> bondEPList
The bonds between atoms.
static List< float[]> backupCatomsLocationlist
Backup of the coordinates of each Carbon alpha.
List< string > InputTypeArray
static float GetMin(List< float > ListValues)
Find the min value of a list of float.
List< string > OutputTypeArray
static List< AtomModel > CaSplineTypeList
Type of each carbon alpha in the CA-Spline.
List< float > OutputBfactArray
static List< float[]> atomsLocationlist
The coordinates of each atom.
List< float[]> OutputKeyNodes