summaryrefslogtreecommitdiff
path: root/academic/wxmacmolplt/wxmacmolplt-7.2.1-raman.patch
blob: 6845b0bdaafeb66bc0b180fbbbc63f0b463dd186 (plain)
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
diff -Nru wxmacmolplt-7.2.1.orig/src/Frame.cpp wxmacmolplt-7.2.1/src/Frame.cpp
--- wxmacmolplt-7.2.1.orig/src/Frame.cpp	2008-04-10 01:04:51.000000000 +0400
+++ wxmacmolplt-7.2.1/src/Frame.cpp	2009-03-09 10:59:11.000000000 +0300
@@ -1896,6 +1896,29 @@
 						} else tVib = icol;
 					}
 				}
+				if (Buffer->LocateKeyWord("RAMAN ACTIVITY:", 15, Buffer->GetFilePos()+132)) {
+					Buffer->GetLine(LineText);
+					LinePos = 16;
+					if ((imode == NumVibs)&&(lVibs->RamanIntensity.empty())) {
+						lVibs->RamanIntensity.reserve(NumModes);
+					}
+					LineLength = strlen(LineText);
+					long	tVib = NumVibs;
+					float	raman;
+					for (long icol=0; icol<tVib; icol++) {
+						if (LinePos<LineLength) {
+							test = sscanf(&(LineText[LinePos]), "%s%n", &token, &nchar);
+							LinePos += nchar;
+							if (test) {
+								if (token[0] != '*') {
+									test = sscanf(token, "%f", &raman);
+									if (test)
+										lVibs->RamanIntensity.push_back(raman);
+								} else lVibs->RamanIntensity.push_back(10000.0);
+							} else tVib = icol;
+						} else tVib = icol;
+					}
+				}
 				if (Buffer->LocateKeyWord("DEPOLARIZATION:", 15, Buffer->GetFilePos()+132)) {
 					Buffer->GetLine(LineText);
 					LinePos = 16;