mirror of
https://gitlab.com/scemama/resultsFile.git
synced 2024-12-22 12:23:38 +01:00
Merge branch 'master' into 'master'
correcting the phase in the CSF information in the gamessfile module See merge request scemama/resultsFile!2
This commit is contained in:
commit
6ddb0d49ea
@ -1301,12 +1301,25 @@ class gamessFile(resultsFile.resultsFileX):
|
|||||||
mo = []
|
mo = []
|
||||||
for i in mostr:
|
for i in mostr:
|
||||||
mo.append (int(i))
|
mo.append (int(i))
|
||||||
p_count=0
|
# Calculate the phase based on the the number of swaps in the determinant
|
||||||
for j in range ( len(mo) ):
|
p_count=0; done = False
|
||||||
if mo[j] < 0:
|
while (not done):
|
||||||
for l in range ( j+1, len(mo) ):
|
swaps = 0
|
||||||
if mo[l] > 0:
|
for j in range ( len(mo) -1 ):
|
||||||
p_count+=1
|
if (abs(mo[j]) > abs(mo[j+1])):
|
||||||
|
tmp = mo[j]
|
||||||
|
mo[j] = mo[j+1]
|
||||||
|
mo[j+1] = tmp
|
||||||
|
swaps += 1
|
||||||
|
elif (abs(mo[j]) == abs(mo[j+1])):
|
||||||
|
if (mo[j] < 0):
|
||||||
|
mo[j] = -mo[j]
|
||||||
|
mo[j+1] = -mo[j+1]
|
||||||
|
swaps += 1
|
||||||
|
if (swaps == 0):
|
||||||
|
done = True
|
||||||
|
else:
|
||||||
|
p_count += swaps
|
||||||
coef = float (buffer[0])*(-1.0)**p_count
|
coef = float (buffer[0])*(-1.0)**p_count
|
||||||
tempcsf_a = []
|
tempcsf_a = []
|
||||||
tempcsf_b = []
|
tempcsf_b = []
|
||||||
|
Loading…
Reference in New Issue
Block a user