int
lmrcImageShapePCAResultsPrint(FILE* fpt, lmrcImageShapePCAInfo* linfo, int mode)
{
- double sum;
+ double sum, sum2;
double lambda[3];
int i;
for(i=0; i<3; i++) {
sum += lambda[i];
}
+ sum2 = 0;
for(i=0; i<3; i++) {
lambda[i] /= sum;
+ sum2 += SQR(lambda[i]);
}
for(i=0; i<3; i++) {
fprintf(fpt, "%15.6f ", lambda[i]);
}
fprintf(fpt, "\n");
- fprintf(fpt, "logS(SphereIndex) : %15.6f\n", log10(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )));
- fprintf(fpt, "exp(S-1)(SphereIndex) : %15.6f\n", exp(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )-1));
- fprintf(fpt, "SphereIndex : %15.6f\n", SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0]));
- fprintf(fpt, "Log(SphereIndex) : %15.6f\n", log10(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
+ if(mode&0x1) {
+ fprintf(fpt, "logS(SphereIndex): %15.6f\n", -log10(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )));
+ fprintf(fpt, "exp(S-1)(SphereIndex): %15.6f\n", 1.0/exp(1/(lambda[0]*lambda[1] + lambda[1]*lambda[2] +lambda[2]*lambda[0] )-1));
+ fprintf(fpt, "SphereIndex(var): %15.6f\n", 1.0/(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
+ fprintf(fpt, "Log(SphereIndex(var)): %15.6f\n", -log10(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
+ fprintf(fpt, "SphereIndex(var): %15.6f\n", 1.0/(SQR(lambda[0] - lambda[1]) + SQR(lambda[1]-lambda[2]) + SQR(lambda[2]-lambda[0])));
+ fprintf(fpt, "SphereIndex(0.33): %15.6f\n", 1.0/(SQR(lambda[0] - 1.0/3) + SQR(lambda[1]-1.0/3) + SQR(lambda[2]-1.0/3)));
+ fprintf(fpt, "Log(SphereIndex(0.33)): %15.6f\n", -log10(SQR(lambda[0] - 1.0/3) + SQR(lambda[1]-1.0/3) + SQR(lambda[2]-1.0/3)));
+ }
+ if(mode&0x2) {
+ fprintf(fpt, "DiskIndex: %15.6f\n", 1.0/(lambda[2]/lambda[0]*lambda[2]/lambda[1]));
+ fprintf(fpt, "logD(DiskIndex): %15.6f\n", -log10(lambda[2]/lambda[0]*lambda[2]/lambda[1]));
+ fprintf(fpt, "DiskIndex(var): %15.6f\n", 1.0/(SQR(lambda[0]-lambda[1]) + SQR(lambda[2] )));
+ fprintf(fpt, "Log(DiskIndex(var)): %15.6f\n", -log10(SQR(lambda[0]-lambda[1]) + SQR(lambda[2] )));
+ fprintf(fpt, "DiskIndex(0.5): %15.6f\n", 1.0/(SQR(lambda[0]-0.5) + SQR(lambda[1]-0.5) + SQR(lambda[2] )));
+ fprintf(fpt, "Log(DiskIndex(0.5)): %15.6f\n", -log10(SQR(lambda[0]-0.5) + SQR(lambda[1]-0.5) + SQR(lambda[2] )));
+ }
+ if(mode&0x4) {
+ fprintf(fpt, "CylinderIndex: %15.6f\n", 1.0/(lambda[1]/lambda[0]*lambda[2]/lambda[0]));
+ fprintf(fpt, "logC(CylinderIndex): %15.6f\n", -log10(lambda[1]/lambda[0]*lambda[2]/lambda[0]));
+ fprintf(fpt, "CylinderIndex(var) : %15.6f\n", 1.0/(SQR(lambda[0] -1) + SQR(lambda[1] - lambda[2])));
+ fprintf(fpt, "Log(CylinderIndex(var) : %15.6f\n", -log10(SQR(lambda[0] -1) +SQR(lambda[1] - lambda[2])));
+ fprintf(fpt, "CylinderIndex(1.0) : %15.6f\n", 1.0/(SQR(lambda[0] -1) + SQR(lambda[1]) + SQR(lambda[2])));
+ fprintf(fpt, "Log(CylinderIndex(1.0)) : %15.6f\n", -log10(SQR(lambda[0] -1) +SQR(lambda[1]) + SQR(lambda[2])));
+ }
+
return 0;
}
WORLDNAME=Tools
WORLDNAME=Tools
WORLDNAME=Tools
+WORLDNAME=Tools
+WORLDNAME=Tools
+++ /dev/null
-include ../Config/Define.inc
-include Config/Define.inc
-include .Source
-
-include Config/Target.inc
--- /dev/null
+/Users/tacyas/Eos/src/Config/Template/ToolsHomeTemplate.Dir/Makefile
\ No newline at end of file
"-i","-i[nput]","Input: mrcImage","Essential","1","1","In","inFile::mrcImage","NULL"
"-o","-o[utput]","Output: ASCII","Optional","1","1","Out","outFile::ASCII","stdout"
"-c","-c[onfig]","ConfigurationFile","Optional","1","1","configFile","inFile","NULL"
-"-m","-m[ode]","Mode","Optional","1","1","mode","Integer","0"
+"-m","-m[ode]","Mode","Optional","1","1","mode","Integer","1"
"-C","-C[ontour]","Contour","Variable","1","1","Contour","Real","1.0"
info->fptIn = NULL; info->flagIn = 0;
info->fptOut = stdout; info->flagOut = 0;
info->fptconfigFile = NULL; info->flagconfigFile = 0;
- info->mode = 0; info->flagmode = 0;
+ info->mode = 1; info->flagmode = 0;
info->Contour = NULL; info->flagContour = 0;
}
fprintf(stderr, " 100%% 60%% 40%%\n");
fprintf(stderr, "----- Objectives -----\n");
fprintf(stderr, "Determine the orientations/molecular axis by PCA alogrism\n");
- fprintf(stderr, " $ mrcImagePCA -i mrc -o parameter -C C1 C2 C3 ...\n");
+ fprintf(stderr, " $ mrcImageShapePCA -i mrc -o parameter -C C1 C2 C3 ...\n");
+ fprintf(stderr, "-m \n");
+ fprintf(stderr, " +1: Sphere (default)\n");
+ fprintf(stderr, " +2: Disk\n");
+ fprintf(stderr, " +4: Cylinder\n");
fprintf(stderr, "\n");
}
[-i[nput] In (NULL ).as(inFile::mrcImage ) ] :Essential :Input: mrcImage
[-o[utput] Out (stdout ).as(outFile::ASCII ) ] :Optional :Output: ASCII
[-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile
- [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode
+ [-m[ode] mode (1 ).as(Integer ) ] :Optional :Mode
[-C[ontour] Contour (1.0 ).as(Real ) ... ] :Variable :Contour
----- Additional Usage -----
-C : ContourLevels
100% 60% 40%
----- Objectives -----
Determine the orientations/molecular axis by PCA alogrism
- $ mrcImagePCA -i mrc -o parameter -C C1 C2 C3 ...
+ $ mrcImageShapePCA -i mrc -o parameter -C C1 C2 C3 ...
+-m
+ +1: Sphere (default)
+ +2: Disk
+ +4: Cylinder
</PRE>
</BODY>
-I 1 0 1 1 0 1 -1x1+1+1.500000 ' ' 'In' 'Input: mrcImage' i
-O 1 0 1 0 0 1 -1x1+1+3.000000 ' ' 'Out' 'Output: ASCII' o
-I 1 0 1 0 0 1 -1x1+1+4.500000 ' ' 'configFile' 'ConfigurationFile' c
- -i 1 0 1 0 0 -1x1+1+6.000000 0 0 0 0 0 'mode' 'Mode' m
+ -i 1 0 1 0 0 -1x1+1+6.000000 0 0 1 0 0 'mode' 'Mode' m
-f 1 0 1 0 0 -1x1+1+7.500000 0 0 1.000000 0 0 0 'Contour' 'Contour' C
-E
-E
exec: exec2
@echo "----- Execution Check -----"
- ../$(OSTYPE)/$(OBJECTNAME) -i data/121p-move.mrc -o data/121p-move.mrc.PCA -C 23696.7
+ ../$(OSTYPE)/$(OBJECTNAME) -i data/121p-move.mrc -o data/121p-move.mrc.PCA -C 23696.7 -m 7
pdbPCA -i data/121p-move.pdb -o data/121p-move.pdb.PCA
@echo "----- Calc check -----"
exec2:
@echo "----- Execution Check -----"
- ../$(OSTYPE)/$(OBJECTNAME) -i data/myosinSwissModRefine2.mrc -o data/myosinSwissModRefine2.mrc.PCA -C 3.11319
+ ../$(OSTYPE)/$(OBJECTNAME) -i data/myosinSwissModRefine2.mrc -o data/myosinSwissModRefine2.mrc.PCA -C 3.11319 -m 7
pdbPCA -i data/myosinSwissModRefine2.pdb -o data/myosinSwissModRefine2.pdb.PCA
@echo "----- Calc check -----"
fprintf(stderr, " [-i[nput] In (NULL ).as(inFile::mrcImage ) ] :Essential :Input: mrcImage\n");
fprintf(stderr, " [-o[utput] Out (stdout ).as(outFile::ASCII ) ] :Optional :Output: ASCII\n");
fprintf(stderr, " [-c[onfig] configFile (NULL ).as(inFile ) ] :Optional :ConfigurationFile\n");
- fprintf(stderr, " [-m[ode] mode (0 ).as(Integer ) ] :Optional :Mode\n");
+ fprintf(stderr, " [-m[ode] mode (1 ).as(Integer ) ] :Optional :Mode\n");
fprintf(stderr, " [-C[ontour] Contour (1.0 ).as(Real ) ... ] :Variable :Contour\n");
additionalUsage();
}