-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmolgroups.h
executable file
·1178 lines (1030 loc) · 42.7 KB
/
molgroups.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//---------------abstract base class---------------------------------------------------------------------
class nSLDObj
{
public:
nSLDObj();
virtual ~nSLDObj();
virtual double fnGetLowerLimit() = 0;
virtual double fnGetUpperLimit() = 0;
virtual double fnGetArea(double z) = 0;
virtual double fnGetConvolutedArea(double z);
virtual double fnGetnSLD(double z) = 0;
virtual void fnSetConvolution(double sigma, int n);
virtual void fnSetSigma(double sigma) = 0;
virtual void fnSetZ(double dz) {z=dz;};
virtual void fnSetnSL(double d) {nSL=d;};
virtual void fnSetnSL(double d1, double d2) {};
virtual void fnSetnSL(double d1, double d2, double d3) {};
virtual void fnSetnSL(double d1, double d2, double d3, double d4) {};
virtual void fnSetnSL(double d1, double d2, double d3, double d4, double d5) {};
virtual double fnGetZ(){return z;};
virtual double fnGetAbsorb(double z);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
virtual double fnWriteProfile(double aArea[], double anSLD[], double aAbsorb[], int dimension, double stepsize, double dMaxArea);
virtual void fnOverlayProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
virtual void fnOverlayProfile(double aArea[], double anSLD[], double aAbsorb[], int dimension, double stepsize, double dMaxArea);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize) = 0;
virtual void fnWriteData2File (FILE *fp, const char *cName, int dimension, double stepsize);
int iNumberOfConvPoints;
bool bWrapping, bConvolution, bProtonExchange;
double absorb, z, l, nf, nSL, nSL2, vol, dSigmaConvolution;
protected:
virtual double CatmullInterpolate(double t, double pm1, double p0, double p1, double p2);
virtual double fnTriCubicCatmullInterpolate(double p[4][4][4],double t[3]);
};
//------------------------------------------------------------------------------------------------------
class BoxErr : public nSLDObj
{
public:
BoxErr() {};
BoxErr(double z, double sigma, double length, double vol, double nSL, double numberfraction);
virtual ~BoxErr();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnSetSigma(double dsigma) {sigma=dsigma;};
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
double sigma;
};
//------------------------------------------------------------------------------------------------------
class Box2Err : public nSLDObj
{
public:
Box2Err() {};
Box2Err(double z, double sigma1, double sigma2, double length, double vol, double nSL, double numberfraction);
virtual ~Box2Err();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSL(double bulknsld);
virtual double fnGetnSLD(double z);
virtual double fnGetnSLD(double z, double bulknsld);
virtual void fnSetnSL(double d1, double d2);
virtual void fnSetSigma(double sigma);
virtual void fnSetSigma(double sigma1, double sigma2);
virtual void fnSetZ(double dz);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
double sigma1, sigma2, nsldbulk_store;
};
//------------------------------------------------------------------------------------------------------
class Gaussian : public nSLDObj
{
public:
Gaussian(double C, double sigma, double vol, double nSL, double numberfraction);
virtual ~Gaussian();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
double sigma;
};
//------------------------------------------------------------------------------------------------------
class Parabolic: public nSLDObj
{
public:
Parabolic(double dC, double dH, double dn, double dnSLD, double dnumberfraction);
virtual ~Parabolic();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
double C, H, n, nSLD;
};
//------------------------------------------------------------------------------------------------------
class StretchGaussian : public nSLDObj
{
public:
StretchGaussian(double z, double sigma, double length, double vol, double nSL, double numberfraction);
virtual ~StretchGaussian();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
double sigma;
};
//---------------------------------------------------------------------------------------------------------
class Discrete: public nSLDObj
{
public:
Discrete(double dstartposition, double dnormarea, const char *cFileName);
virtual ~Discrete();
virtual double fnGetArea(double dz);
virtual double fnGetnSLD(double dz);
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual void fnSet(double _startposition, double _protonexchange, double _nsldbulksolvent, double _nf, double _normarea);
virtual void fnSetNormarea(double dnormarea);
virtual void fnSetSigma(double _sigma);
virtual void fnWritePar2File(FILE *fp, const char *cName, int dimension, double stepsize);
double dStartPosition, dProtExchange, dnSLDBulkSolvent;
double * area;
double * nSLProt;
double * nSLDeut;
double * zcoord;
double nf; //number of proteins per unit area (typically area per outer leaflet lipid)
private:
int iNumberOfPoints;
double dZSpacing, normarea;
};
//---------------------------------------------------------------------------------------------------------
class DiscreteEuler: public nSLDObj
{
public:
DiscreteEuler(double dstartposition, double dnormarea, double dBetaStart, double dBetaEnd, double dBetaInc,
double dGammaStart, double dGammaEnd, double dGammaInc, const char* strFileNameRoot,
const char* strFileNameBeta, const char* strFileNameGamma, const char* strFileNameEnding);
virtual ~DiscreteEuler();
virtual double fnGetArea(double dz);
virtual double fnGetnSLD(double dz);
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetVolume(double dz1, double dz2);
virtual void fnSetNormarea(double dnormarea);
virtual void fnSetSigma(double sigma) {dsigma=sigma;}
virtual void fnWritePar2File(FILE *fp, const char *cName, int dimension, double stepsize);
double dStartPosition, dProtExchange, dnSLDBulkSolvent;
double dBeta, dGamma; //Euler angles
char* strFileNameRoot[30], strFileNameBeta[30], strFileNameGamma[30], strFileNameEnding[30];
double * area;
double * nSLProt;
double * nSLDeut;
double * zcoord;
double nf, dsigma; //number of proteins per unit area
//(typically area per outer leaflet lipid)
private:
int iNumberOfBeta, iNumberOfGamma, iNumberOfPoints;
double dBetaStart, dBetaEnd, dBetaInc, dGammaStart, dGammaEnd, dGammaInc;
double dZSpacing, normarea;
int fn3Cto1C(int c1, int c2, int c3);
};
//---------------------------------------------------------------------------------------------------------
class Discrete3Euler: public nSLDObj
{
public:
Discrete3Euler(double dnormarea, double dstartposition1, double dBetaStart1, double dBetaEnd1, double dBetaInc1, double dGammaStart1, double dGammaEnd1, double dGammaInc1, const char* strFileNameRoot1, const char* strFileNameBeta1, const char* strFileNameGamma1, const char* strFileNameEnding1, double dstartposition2, double dBetaStart2, double dBetaEnd2, double dBetaInc2, double dGammaStart2, double dGammaEnd2, double dGammaInc2, const char* strFileNameRoot2, const char* strFileNameBeta2, const char* strFileNameGamma2, const char* strFileNameEnding2, double dstartposition3, double dBetaStart3, double dBetaEnd3, double dBetaInc3, double dGammaStart3, double dGammaEnd3, double dGammaInc3, const char* strFileNameRoot3, const char* strFileNameBeta3, const char* strFileNameGamma3, const char* strFileNameEnding3);
virtual ~Discrete3Euler();
virtual double fnGetArea(double dz);
virtual double fnGetnSLD(double dz);
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetVolume(double dz1, double dz2);
virtual void fnSet(double bulknsld, double protonexchangeratio, double dBeta1, double dGamma1, double dStartPosition1, double nf_protein1, double dBeta2, double dGamma2, double dStartPosition2, double nf_protein2, double dBeta3, double dGamma3, double dStartPosition3, double nf_protein3);
virtual void fnSetNormarea(double dnormarea);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File(FILE *fp, const char *cName, int dimension, double stepsize);
DiscreteEuler *protein1, *protein2, *protein3;
};
//---------------------------------------------------------------------------------------------------------
//Freeform group 10 boxes
//---------------------------------------------------------------------------------------------------------
class FreeBox: public nSLDObj
{
public:
FreeBox(int n, double dstartposition, double dnSLD, double dnormarea);
virtual ~FreeBox();
virtual void fnAdjustParameters();
virtual double fnGetArea(double dz);
virtual double fnGetnSLD(double dz);
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual void fnSetStartposition(double dz);
virtual void fnSetNormarea(double dnormarea);
virtual void fnSetnSLD(double dnSLD);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File(FILE *fp, const char *cName, int dimension, double stepsize);
Box2Err *box1, *box2, *box3, *box4, *box5, *box6, *box7, *box8, *box9, *box10;
int numberofboxes;
double vf1, vf2, vf3, vf4, vf5, vf6, vf7, vf8, vf9, vf10;
double normarea, startposition, nSLD;
};
//---------------------------------------------------------------------------------------------------------
class Hermite: public nSLDObj
{
public:
Hermite(){};
Hermite(int n, double dstartposition, double dnSLD, double dnormarea);
virtual ~Hermite();
virtual double fnGetArea(double dz);
virtual double fnGetnSLD(double dz);
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetVolume(double dz1, double dz2);
virtual void fnSetNormarea(double dnormarea);
virtual void fnSetnSLD(double dnSLD);
virtual void fnSetRelative(double dSpacing, double dStart, double dDp[], double dVf[], double dnf);
virtual void fnSetSigma(double sigma){};
virtual void fnWritePar2File(FILE *fp, const char *cName, int dimension, double stepsize);
int numberofcontrolpoints, monotonic, damping;
double dampthreshold, dampFWHM, damptrigger;
double * vf;
double * dp;
double * damp;
double normarea, nSLD;
protected:
virtual double fnGetSplineAntiDerivative(double dz, double dp[], double dh[]);
virtual double fnGetSplineArea(double dz, double dp[], double dh[], int damping);
virtual int fnGetSplinePars(double d, double dp[], double dh[], double &m0, double &m1, double &p0, double &p1);
virtual double fnGetSplineIntegral(double dz1, double dz2, double dp[], double dh[]);
virtual double fnGetSplineProductIntegral(double dz1, double dz2, double dp[], double dh1[], double dh2[]);
};
//------------------------------------------------------------------------------------------------------
class SLDHermite: public Hermite
{
public:
SLDHermite() {};
SLDHermite(int n, double dstartposition, double dnormarea);
virtual ~SLDHermite();
virtual double fnGetnSL(double dz1, double dz2);
virtual double fnGetnSLD(double dz);
virtual double fnGetnSLDIntegral(double dz1, double dz2);
virtual void fnSetTotalnSLD(double _totalnSLD);
using Hermite::fnSetRelative;
virtual void fnSetRelative(double dSpacing, double dStart, double _dp[], double _vf[], double _sld[], double dnf);
double * sld;
double totalnSLD;
int bTotalnSLD;
};
//------------------------------------------------------------------------------------------------------
//PC headgroup
class PC: public nSLDObj
{
protected:
double z;
public:
PC();
virtual ~PC();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetTotalnSL();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual double fnGetZ() {return z;};
virtual void fnSetSigma(double sigma);
virtual void fnSetZ(double dz);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
Box2Err *cg;
Box2Err *phosphate;
Box2Err *choline;
};
//------------------------------------------------------------------------------------------------------
class PCm: public PC
{
public:
PCm();
virtual ~PCm();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
};
//------------------------------------------------------------------------------------------------------
//PS headgroup
class PS: public nSLDObj
{
protected:
double z;
public:
PS();
virtual ~PS();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual double fnGetZ() {return z;};
virtual void fnSetSigma(double sigma);
virtual void fnSetZ(double dz);
virtual void fnSetnSL(double nSL_cg, double nSL_phosphate, double nSL_serine);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
Box2Err *cg;
Box2Err *phosphate;
Box2Err *serine;
};
//------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------
//AminoAcid
//------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------
//general implementation
//-----------------------------------------------------------------------------------------------------------
class AminoAcid: public BoxErr
{
public:
AminoAcid();
virtual ~AminoAcid() {};
virtual double fnGetnSLD(double z);
int nH, nExch, Deuterated;
double ExchangeRatio;
};
//-----------------------------------------------------------------------------------------------------------
//Specific implementations
//-----------------------------------------------------------------------------------------------------------
class AA_Lys: public AminoAcid
{
public:
AA_Lys();
virtual ~AA_Lys() {};
};
class AA_Arg: public AminoAcid
{
public:
AA_Arg();
virtual ~AA_Arg() {};
};
class AA_His: public AminoAcid
{
public:
AA_His();
virtual ~AA_His() {};
};
class AA_Asn: public AminoAcid
{
public:
AA_Asn();
virtual ~AA_Asn() {};
};
class AA_Asp: public AminoAcid
{
public:
AA_Asp();
virtual ~AA_Asp() {};
};
class AA_Cys: public AminoAcid
{
public:
AA_Cys();
virtual ~AA_Cys() {};
};
class AA_Thr: public AminoAcid
{
public:
AA_Thr();
virtual ~AA_Thr() {};
};
class AA_Ser: public AminoAcid
{
public:
AA_Ser();
virtual ~AA_Ser() {};
};
class AA_Gln: public AminoAcid
{
public:
AA_Gln();
virtual ~AA_Gln() {};
};
class AA_Glu: public AminoAcid
{
public:
AA_Glu();
virtual ~AA_Glu() {};
};
class AA_Pro: public AminoAcid
{
public:
AA_Pro();
virtual ~AA_Pro() {};
};
class AA_Gly: public AminoAcid
{
public:
AA_Gly();
virtual ~AA_Gly() {};
};
class AA_Ala: public AminoAcid
{
public:
AA_Ala();
virtual ~AA_Ala() {};
};
class AA_Val: public AminoAcid
{
public:
AA_Val();
virtual ~AA_Val() {};
};
class AA_Ile: public AminoAcid
{
public:
AA_Ile();
virtual ~AA_Ile() {};
};
class AA_Leu: public AminoAcid
{
public:
AA_Leu();
virtual ~AA_Leu() {};
};
class AA_Met: public AminoAcid
{
public:
AA_Met();
virtual ~AA_Met() {};
};
class AA_Tyr: public AminoAcid
{
public:
AA_Tyr();
virtual ~AA_Tyr() {};
};
class AA_Phe: public AminoAcid
{
public:
AA_Phe();
virtual ~AA_Phe() {};
};
class AA_Trp: public AminoAcid
{
public:
AA_Trp();
virtual ~AA_Trp() {};
};
//------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------
//Lipid bilayers
//------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------
//General Implementations
//------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------
//floating bilayers
//------------------------------------------------------------------------------------------------------
class BLM_quaternary: public nSLDObj
{
protected:
double normarea;
public:
BLM_quaternary();
virtual ~BLM_quaternary();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnSet(double sigma, double bulknsld, double startz, double l_lipid1, double l_lipid2, double vf_bilayer, double nf_lipid_2=0, double nf_lipid3=0, double nf_chol=0, double hc_substitution_1=0, double hc_substitution_2=0, double radius_defect=100);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
PCm *headgroup1; //mirrored PC head group
Box2Err *lipid1;
Box2Err *methyl1;
Box2Err *methyl2;
Box2Err *lipid2;
PC *headgroup2; //PC head group
Box2Err *headgroup1_2;
Box2Err *headgroup2_2;
Box2Err *headgroup1_3;
Box2Err *headgroup2_3;
Box2Err *defect_hydrocarbon;
Box2Err *defect_headgroup;
//primary fit parameters
double sigma, l_lipid1, l_lipid2, vf_bilayer, startz;
double hc_substitution_1, hc_substitution_2, radius_defect, bulknsld;
double nf_lipid_2, nf_lipid_3, nf_chol;
//other parameters
double volacyllipid, nslacyllipid, volmethyllipid, nslmethyllipid;
double volacyllipid_2, nslacyllipid_2, volmethyllipid_2, nslmethyllipid_2;
double volacyllipid_3, nslacyllipid_3, volmethyllipid_3, nslmethyllipid_3;
double volchol, nslchol;
};
//------------------------------------------------------------------------------------------------------
//monlayer, single-lipid bilayer
//------------------------------------------------------------------------------------------------------
class Monolayer: public nSLDObj
{
protected:
double normarea;
public:
Monolayer();
virtual ~Monolayer();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnSetSigma(double sigma);
virtual void fnSetnSL(double nSL_methyl, double nSL_lipid, double nSL_headgroup1, double nSL_headgroup2, double nSL_headgroup3);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
virtual double fnWriteProfile(double aArea[], double anSLD[], double aAbsorb[], int dimension, double stepsize, double dMaxArea);
Box2Err *substrate;
nSLDObj *headgroup;
Box2Err *lipid;
Box2Err *methyl;
//primary fit parameters
double global_rough, sigma, l_lipid, vf_bilayer, rho_substrate, absorb_substrate;
double hc_substitution;
//other parameters
double volacyllipid, nslacyllipid, volmethyllipid, nslmethyllipid, absorbacyllipid, absorbmethyllipid;
};
//------------------------------------------------------------------------------------------------------
//solid supported lipid bilayer, single-lipid bilayer
//------------------------------------------------------------------------------------------------------
class ssBLM: public nSLDObj
{
protected:
double normarea;
public:
ssBLM();
virtual ~ssBLM();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnSet(double sigma, double global_rough, double rho_substrate, double rho_siox, double l_siox, double l_submembrane, double l_lipid1, double l_lipid2, double vf_bilayer, double hc_substitution_1=0, double hc_substitution_2=0, double radius_defect=100);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
Box2Err *substrate;
Box2Err *siox;
PCm *headgroup1; //mirrored PC head group
Box2Err *lipid1;
Box2Err *methyl1;
Box2Err *methyl2;
Box2Err *lipid2;
PC *headgroup2; //PC head group
Box2Err *defect_hydrocarbon;
Box2Err *defect_headgroup;
//primary fit parameters
double global_rough, sigma, l_lipid1, l_lipid2, vf_bilayer, rho_substrate, rho_siox, l_submembrane, l_siox;
double hc_substitution_1, hc_substitution_2, radius_defect;
//other parameters
double volacyllipid, nslacyllipid, volmethyllipid, nslmethyllipid;
};
class ssBLM_quaternary: public nSLDObj
{
protected:
double normarea;
public:
ssBLM_quaternary();
virtual ~ssBLM_quaternary();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnSet(double sigma, double global_rough, double rho_substrate, double bulknsld, double rho_siox, double l_siox, double l_submembrane, double l_lipid1, double l_lipid2, double vf_bilayer, double nf_lipid_2=0, double nf_lipid3=0, double nf_chol=0, double hc_substitution_1=0, double hc_substitution_2=0, double radius_defect=100);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
Box2Err *substrate;
Box2Err *siox;
PCm *headgroup1; //mirrored PC head group
Box2Err *lipid1;
Box2Err *methyl1;
Box2Err *methyl2;
Box2Err *lipid2;
PC *headgroup2; //PC head group
Box2Err *headgroup1_2;
Box2Err *headgroup2_2;
Box2Err *headgroup1_3;
Box2Err *headgroup2_3;
Box2Err *defect_hydrocarbon;
Box2Err *defect_headgroup;
//primary fit parameters
double global_rough, sigma, l_lipid1, l_lipid2, vf_bilayer, rho_substrate, rho_siox, l_submembrane, l_siox;
double hc_substitution_1, hc_substitution_2, radius_defect, bulknsld;
double nf_lipid_2, nf_lipid_3, nf_chol;
//other parameters
double volacyllipid, nslacyllipid, volmethyllipid, nslmethyllipid;
double volacyllipid_2, nslacyllipid_2, volmethyllipid_2, nslmethyllipid_2;
double volacyllipid_3, nslacyllipid_3, volmethyllipid_3, nslmethyllipid_3;
double volchol, nslchol;
};
//------------------------------------------------------------------------------------------------------
//quaternary ssBLM with two substrate layers on the canvas, for example, SiOx and Cr
class ssBLM_quaternary_2sub: public ssBLM_quaternary
{
public:
ssBLM_quaternary_2sub();
virtual ~ssBLM_quaternary_2sub();
virtual void fnAdjustParameters();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnSet_2sub(double sigma, double global_rough, double rho_substrate, double bulknsld, double rho_siox, double l_siox, double rho_cr, double l_cr, double l_submembrane, double l_lipid1, double l_lipid2, double vf_bilayer, double nf_lipid_2=0, double nf_lipid3=0, double nf_chol=0, double hc_substitution_1=0, double hc_substitution_2=0, double radius_defect=100);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
Box2Err *cr;
//primary fit parameters
double rho_cr, l_cr;
};
//------------------------------------------------------------------------------------------------------
class hybridBLM_quaternary: public nSLDObj
{
protected:
double normarea;
public:
hybridBLM_quaternary();
virtual ~hybridBLM_quaternary();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetNormarea() {return normarea;};
virtual double fnGetnSLD(double z);
virtual void fnSet(double sigma, double global_rough, double rho_substrate, double bulknsld, double l_lipid1, double l_lipid2, double vf_bilayer, double nf_lipid_2=0, double nf_lipid3=0, double nf_chol=0, double hc_substitution_1=0, double hc_substitution_2=0, double radius_defect=100);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
Box2Err *substrate;
Box2Err *headgroup1; //mirrored PC head group
Box2Err *lipid1;
Box2Err *methyl1;
Box2Err *methyl2;
Box2Err *lipid2;
PC *headgroup2; //PC head group
Box2Err *headgroup1_2;
Box2Err *headgroup2_2;
Box2Err *headgroup1_3;
Box2Err *headgroup2_3;
Box2Err *defect_hydrocarbon;
Box2Err *defect_headgroup;
//primary fit parameters
double global_rough, sigma, l_lipid1, l_lipid2, vf_bilayer, rho_substrate;
double hc_substitution_1, hc_substitution_2, radius_defect, bulknsld;
double nf_lipid_2, nf_lipid_3, nf_chol;
//other parameters
double volacylsam, nslacylsam, volheadsam, nslheadsam, volmethylsam, nslmethylsam;
double volacyllipid, nslacyllipid, volmethyllipid, nslmethyllipid;
double volacyllipid_2, nslacyllipid_2, volmethyllipid_2, nslmethyllipid_2;
double volacyllipid_3, nslacyllipid_3, volmethyllipid_3, nslmethyllipid_3;
double volchol, nslchol;
};
//------------------------------------------------------------------------------------------------------
//tethered lipid bilayer, quaternary lipid bilayer
class tBLM_quaternary_chol: public nSLDObj
{
public:
tBLM_quaternary_chol();
virtual ~tBLM_quaternary_chol();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetNormarea() {return normarea;};
virtual double fnGetnSLD(double z);
virtual void fnSet(double sigma, double global_rough, double rho_substrate, double dbulknsld, double nf_tether, double mult_tether, double l_tether, double l_lipid1, double l_lipid2, double vf_bilayer, double nf_lipid_2=0, double nf_lipid_3=0, double nf_chol=0, double hc_substitution_1=0, double hc_substitution_2=0, double radius_defect=100);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
Box2Err *substrate;
Box2Err *bME;
Box2Err *tether;
Box2Err *tetherg;
PCm *headgroup1; //mirrored PC head group
Box2Err *lipid1;
Box2Err *methyl1;
Box2Err *methyl2;
Box2Err *lipid2;
PC *headgroup2; //PC head group
Box2Err *headgroup1_2;
Box2Err *headgroup2_2;
Box2Err *headgroup1_3;
Box2Err *headgroup2_3;
Box2Err *defect_hydrocarbon;
Box2Err *defect_headgroup;
//primary fit parameters
double global_rough, sigma, l_lipid1, l_lipid2, vf_bilayer, l_tether, nf_tether, mult_tether, rho_substrate, bulknsld;
double hc_substitution_1, hc_substitution_2, radius_defect;
double nf_lipid_2;
double nf_lipid_3;
double nf_chol;
double normarea;
//other parameters
double volacyllipid, nslacyllipid, volmethyllipid, nslmethyllipid, volmethyltether;
double nslmethyltether, volacyltether, nslacyltether;
double volacyllipid_2, nslacyllipid_2, volmethyllipid_2, nslmethyllipid_2;
double volacyllipid_3, nslacyllipid_3, volmethyllipid_3, nslmethyllipid_3;
double volchol, nslchol;
};
//------------------------------------------------------------------------------------------------------
//tethered lipid bilayer, quaternary lipid bilayer
//there will be a domains implemented in a way that
//there is a separate set of nf_..._domain parameters for
//the second domain, and that there is a frac_domain parameter
//determining the surface fraction of the second domain
class tBLM_quaternary_chol_domain: public tBLM_quaternary_chol
{
protected:
double normarea, normarea_domain;
public:
tBLM_quaternary_chol_domain();
virtual ~tBLM_quaternary_chol_domain();
virtual void fnAdjustParameters();
virtual double fnGetLowerLimit();
virtual double fnGetUpperLimit();
virtual double fnGetArea(double z);
virtual double fnGetnSLD(double z);
virtual void fnSetSigma(double sigma);
virtual void fnWritePar2File (FILE *fp, const char *cName, int dimension, double stepsize);
virtual double fnWriteProfile(double aArea[], double anSLD[], int dimension, double stepsize, double dMaxArea);
PCm *headgroup1_domain;
Box2Err *lipid1_domain;
Box2Err *methyl1_domain;
Box2Err *methyl2_domain;
Box2Err *lipid2_domain;
PC *headgroup2_domain;
Box2Err *headgroup1_2_domain;
Box2Err *headgroup2_2_domain;
Box2Err *headgroup1_3_domain;
Box2Err *headgroup2_3_domain;
Box2Err *tetherg_domain;
Box2Err *tether_domain;
double nf_lipid_2_domain;
double nf_lipid_3_domain;
double nf_chol_domain;
//frac_domain is a molar fraction
double frac_domain, l_lipid1_domain, l_lipid2_domain, l_tether_domain;
};
//------------------------------------------------------------------------------------------------------
// Bilayer Library -- floating bilayer
//-----------------------------------------------------------------------------------------------------------
class BLM_DOPC_DOPS_PIP_chol: public BLM_quaternary
{
public:
BLM_DOPC_DOPS_PIP_chol();
virtual ~BLM_DOPC_DOPS_PIP_chol() {};
};
//------------------------------------------------------------------------------------------------------
// Bilayer Library -- Monolayer
//-----------------------------------------------------------------------------------------------------------
class Monolayer_DOPS: public Monolayer
{
public:
Monolayer_DOPS();
virtual ~Monolayer_DOPS();
};
class Monolayer_DOPS_xray: public Monolayer_DOPS
{
public:
Monolayer_DOPS_xray();
virtual ~Monolayer_DOPS_xray();
};
class Monolayer_DPPS: public Monolayer
{
public:
Monolayer_DPPS();
virtual ~Monolayer_DPPS();
};
class Monolayer_DPPS_xray: public Monolayer_DPPS
{
public:
Monolayer_DPPS_xray();
virtual ~Monolayer_DPPS_xray();
};
//-----------------------------------------------------------------------------------------------------------
// Bilayer Library -- ssBLM
//-----------------------------------------------------------------------------------------------------------
class ssBLM_DMPC: public ssBLM
{
public:
ssBLM_DMPC();
virtual ~ssBLM_DMPC() {};
};
class ssBLM_d54DMPC: public ssBLM
{
public:
ssBLM_d54DMPC();
virtual ~ssBLM_d54DMPC() {};
};
class ssBLM_d67DMPC: public ssBLM
{
public:
ssBLM_d67DMPC();
virtual ~ssBLM_d67DMPC() {};
};
class ssBLM_POPC: public ssBLM
{
public:
ssBLM_POPC();
virtual ~ssBLM_POPC() {};
};
class ssBLM_d31POPC: public ssBLM
{
public:
ssBLM_d31POPC();
virtual ~ssBLM_d31POPC() {};
};
class ssBLM_POPC_PIP: public ssBLM_quaternary
{
public:
ssBLM_POPC_PIP();
virtual ~ssBLM_POPC_PIP() {};
};
class ssBLM_POPC_POPS_PIP_chol: public ssBLM_quaternary
{
public:
ssBLM_POPC_POPS_PIP_chol();
virtual ~ssBLM_POPC_POPS_PIP_chol() {};
};
class ssBLM_DOPC_DOPS_PIP_chol: public ssBLM_quaternary
{
public:
ssBLM_DOPC_DOPS_PIP_chol();
virtual ~ssBLM_DOPC_DOPS_PIP_chol() {};
};
//-----------------------------------------------------------------------------------------------------------
// Bilayer Library -- ssBLM
//-----------------------------------------------------------------------------------------------------------
class ssBLM_2sub_POPC_POPS_PIP_chol: public ssBLM_quaternary_2sub
{
public:
ssBLM_2sub_POPC_POPS_PIP_chol();
virtual ~ssBLM_2sub_POPC_POPS_PIP_chol() {};
};
//-----------------------------------------------------------------------------------------------------------
// Bilayer Library -- hybridBLM
//-----------------------------------------------------------------------------------------------------------
class hybridBLM_POPC_POPS_PIP_chol: public hybridBLM_quaternary
{
public:
hybridBLM_POPC_POPS_PIP_chol();
virtual ~hybridBLM_POPC_POPS_PIP_chol() {};
};
class hybridBLM_DOPC_DOPS_PIP_chol: public hybridBLM_quaternary
{
public:
hybridBLM_DOPC_DOPS_PIP_chol();
virtual ~hybridBLM_DOPC_DOPS_PIP_chol() {};
};
//------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------
// tBLM Library -- tBLM
//-----------------------------------------------------------------------------------------------------------
class tBLM_HC18_DOPC: public tBLM_quaternary_chol
{
public:
tBLM_HC18_DOPC();
virtual ~tBLM_HC18_DOPC() {};
};
class tBLM_HC18_d54DMPC: public tBLM_quaternary_chol
{
public:
tBLM_HC18_d54DMPC();
virtual ~tBLM_HC18_d54DMPC() {};
};
class tBLM_HC18_d31POPC: public tBLM_quaternary_chol