-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJP.cpp
More file actions
56 lines (56 loc) · 754 Bytes
/
JP.cpp
File metadata and controls
56 lines (56 loc) · 754 Bytes
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
#include <cstring>
void StringToJP(string inpstr, double &J, int &P)
{
J=0;
P=0;
if(!strcmp(inpstr.c_str(),"1s1/2"))
{
J=0.5;
P=1;
}
if((!strcmp(inpstr.c_str(),"1p1/2"))||(!strcmp(inpstr.c_str(),"2p1/2")))
{
J=0.5;
P=-1;
}
if((!strcmp(inpstr.c_str(),"1p3/2"))||(!strcmp(inpstr.c_str(),"2p3/2")))
{
J=1.5;
P=-1;
}
if(!strcmp(inpstr.c_str(),"1d5/2"))
{
J=2.5;
P=1;
}
if(!strcmp(inpstr.c_str(),"1d3/2"))
{
J=1.5;
P=-1;
}
if(!strcmp(inpstr.c_str(),"2s1/2"))
{
J=0.5;
P=1;
}
if(!strcmp(inpstr.c_str(),"1f7/2"))
{
J=3.5;
P=-1;
}
if(!strcmp(inpstr.c_str(),"1f5/2"))
{
J=2.5;
P=-1;
}
if(!strcmp(inpstr.c_str(),"1g7/2"))
{
J=3.5;
P=1;
}
if(!strcmp(inpstr.c_str(),"1g9/2"))
{
J=4.5;
P=1;
}
}