Skip to content

Commit

Permalink
Merge pull request #104 from efposadac/moreEasyIssues
Browse files Browse the repository at this point in the history
Adding options to add custom potentials and particles. Also setting t…
  • Loading branch information
jacharrym authored Nov 27, 2024
2 parents c84166f + b3d256f commit 77837ad
Show file tree
Hide file tree
Showing 46 changed files with 3,723 additions and 2,083 deletions.
40 changes: 33 additions & 7 deletions bin/lowdin
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ if [ $extFile="lowdin" ]; then
else if(toupper($i)==toupper("m")){
printf("\tInputParticle_mass = %s\n",toupper($(i+2)) )
}
else if(toupper($i)==toupper("eta")){
printf("\tInputParticle_eta = %s\n",toupper($(i+2)) )
}
else if(toupper($i)==toupper("omega")){
printf("\tInputParticle_omega = %s\n",toupper($(i+2)) )
}
Expand Down Expand Up @@ -381,10 +384,10 @@ if [ $extFile="lowdin" ]; then
' | $SED "s/,/./g" >> $nameFile.aux

###########################################
# Check custom basis sets in the input
# Check custom basis sets/potentials in the input
###########################################

BASIS_NAMES=(`gawk '($1~/BASIS/){print toupper($2)}' $nameFile`)
BASIS_NAMES=(`gawk '($1~/^BASIS$/){print toupper($2)}' $nameFile`)
if [ ${#BASIS_NAMES[@]} -gt "0" ]
then
for BASIS_NAME in ${BASIS_NAMES[@]}
Expand All @@ -401,6 +404,23 @@ if [ $extFile="lowdin" ]; then
done
fi

POTENTIALS_NAMES=(`gawk '($1~/^POTENTIAL$/){print toupper($2)}' $nameFile`)
if [ ${#POTENTIALS_NAMES[@]} -gt "0" ]
then
for POTENTIALS_NAME in ${POTENTIALS_NAMES[@]}
do
if [ -e $LOWDIN_DATA/basis/$POTENTIALS_NAME ]
then
echo "## ERROR: ## The custom potential file already exists in " $LOWDIN_DATA/potentials/$POTENTIALS_NAME
echo "Modify the POTENTIALS block in your input and select a different name"
exit 1
fi
gawk '($1~/^POTENTIAL$/ && toupper($2)~/^'$POTENTIALS_NAME'$/){flag=1; next}
($0~/END/){flag=0};
(flag==1){print toupper($0)}' $nameFile > $POTENTIALS_NAME.$PID
done
fi


###########################################
# Exec lowdin.x
Expand All @@ -421,6 +441,7 @@ if [ $extFile="lowdin" ]; then

cp $nameFile*.vec $LOWDIN_SCRATCH/$nameFile &> /dev/null
cp $nameFile*.plainvec $LOWDIN_SCRATCH/$nameFile &> /dev/null
cp $nameFile*.fchk $LOWDIN_SCRATCH/$nameFile &> /dev/null
cp $nameFile*.val $LOWDIN_SCRATCH/$nameFile &> /dev/null
cp $nameFile*.dens $LOWDIN_SCRATCH/$nameFile &> /dev/null
cp $nameFile*.sup $LOWDIN_SCRATCH/$nameFile &> /dev/null
Expand All @@ -432,20 +453,24 @@ if [ $extFile="lowdin" ]; then
mv $nameFile*.over $LOWDIN_SCRATCH/$nameFile &> /dev/null
mv $nameFile*.kin $LOWDIN_SCRATCH/$nameFile &> /dev/null
mv $nameFile*.coeff $LOWDIN_SCRATCH/$nameFile &> /dev/null
#PID to avoid basis duplicates in simultaneous calculations
cp $nameFile*.gms.bs $LOWDIN_SCRATCH/$nameFile &> /dev/null

#PID to avoid basis/potentials duplicates in simultaneous calculations
if [ ${#BASIS_NAMES[@]} -gt "0" ]
then
for BASIS_NAME in ${BASIS_NAMES[@]}
do
mv $BASIS_NAME.$PID $LOWDIN_SCRATCH/$nameFile/$BASIS_NAME &> /dev/null
done
fi

if [ -e $nameFile.gms.bs ]
if [ ${#POTENTIALS_NAMES[@]} -gt "0" ]
then
cp $nameFile.gms.bs $LOWDIN_SCRATCH/$nameFile
for POTENTIALS_NAME in ${POTENTIALS_NAMES[@]}
do
mv $POTENTIALS_NAME.$PID $LOWDIN_SCRATCH/$nameFile/$POTENTIALS_NAME &> /dev/null
done
fi

# setting default number of cores for OpenMP

if [ -z "$OMP_NUM_THREADS" ]; then
Expand Down Expand Up @@ -515,6 +540,7 @@ if [ $extFile="lowdin" ]; then
mv $LOWDIN_SCRATCH/$nameFile/$nameFile*.47 $currentPath &> 2
mv $LOWDIN_SCRATCH/$nameFile/*.vec $currentPath &> 2
mv $LOWDIN_SCRATCH/$nameFile/*.plainvec $currentPath &> 2
mv $LOWDIN_SCRATCH/$nameFile/*.fchk $currentPath &> 2
# mv $LOWDIN_SCRATCH/$nameFile/*.val $currentPath &> 2
mv $LOWDIN_SCRATCH/$nameFile/*.NOCI.coords $currentPath &> 2
mv $LOWDIN_SCRATCH/$nameFile/*.NOCI.s* $currentPath &> 2
Expand Down
44 changes: 0 additions & 44 deletions lib/basis/H2O-1S1P1D

This file was deleted.

52 changes: 50 additions & 2 deletions lib/basis/PSX-DZ
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
O-POSITRON E+ (5S) BASIS TYPE: 3
# (5S)-[5S]
O-POSITRON E+ (5S3P2D) BASIS TYPE: 3
# (5S3P2D)-[5S3P2D]
10
1 0 1
.0189693659 1.0
1 0 1
.05186863351164733038 1.0
1 0 1
.14182630861506996771 1.0
1 0 1
.38780088183468771642 1.0
1 0 1
1.06037818667291718709 1.0
1 1 1
.0590955656 1.0
1 1 1
.16127967470846848928 1.0
1 1 1
.44015372744092004227 1.0
1 2 1
.11654481880000000000 1.0
1 2 1
.31287113568838127412 1.0

O-POSITRON E+A (5S3P2D) BASIS TYPE: 3
# (5S3P2D)-[5S3P2D]
10
1 0 1
.0189693659 1.0
1 0 1
.05186863351164733038 1.0
1 0 1
.14182630861506996771 1.0
1 0 1
.38780088183468771642 1.0
1 0 1
1.06037818667291718709 1.0
1 1 1
.0590955656 1.0
1 1 1
.16127967470846848928 1.0
1 1 1
.44015372744092004227 1.0
1 2 1
.11654481880000000000 1.0
1 2 1
.31287113568838127412 1.0

O-POSITRON E+B (5S3P2D) BASIS TYPE: 3
# (5S3P2D)-[5S3P2D]
10
1 0 1
.0189693659 1.0
Expand Down
16 changes: 0 additions & 16 deletions lib/dataBases/constantsOfCoupling.lib
Original file line number Diff line number Diff line change
Expand Up @@ -4525,19 +4525,3 @@
LAMBDA = 2.0
PARTICLESFRACTION = 0.5
/
&SPECIE
NAME = "HA-TIP"
SYMBOL = "X0.5+"
KAPPA = -1.0
ETA = 1.0
LAMBDA = 1.0
PARTICLESFRACTION = 1
/
&SPECIE
NAME = "HB-TIP"
SYMBOL = "Y0.5+"
KAPPA = -1.0
ETA = 1.0
LAMBDA = 1.0
PARTICLESFRACTION = 1
/
36 changes: 6 additions & 30 deletions lib/dataBases/elementalParticles.lib
Original file line number Diff line number Diff line change
Expand Up @@ -171,71 +171,47 @@
SYMBOL = "HEA3"
CATEGORY = "LEPTON"
CHARGE = 1
MASS = 5494.892576965
MASS = 5495.8851
SPIN = 0.5
/
&PARTICLE
NAME = "HE-ATOM2"
SYMBOL = "HEB3"
CATEGORY = "LEPTON"
CHARGE = 1
MASS = 5494.892576965
MASS = 5495.8851
SPIN = 0.5
/
&PARTICLE
NAME = "HE-ATOM"
SYMBOL = "HES3"
CATEGORY = "LEPTON"
CHARGE = 1
MASS = 5494.892576965
MASS = 5495.8851
SPIN = 0.5
/
&PARTICLE
NAME = "HE-ATOM1"
SYMBOL = "HEA4"
CATEGORY = "LEPTON"
CHARGE = 1
MASS = 7292.327967297
MASS = 7294.2994
SPIN = 0.5
/
&PARTICLE
NAME = "HE-ATOM2"
SYMBOL = "HEB4"
CATEGORY = "LEPTON"
CHARGE = 1
MASS = 7292.327967297
MASS = 7294.2994
SPIN = 0.5
/
&PARTICLE
NAME = "HE-ATOM"
SYMBOL = "HES4"
CATEGORY = "LEPTON"
CHARGE = 1
MASS = 7292.327967297
SPIN = 0.5
/
&PARTICLE
NAME = "HA-TIP"
SYMBOL = "X0.5+"
CATEGORY = "LEPTON"
CHARGE = 0.5564
MASS = 1836.15267247
SPIN = 0.5
/
&PARTICLE
NAME = "HB-TIP"
SYMBOL = "Y0.5+"
CATEGORY = "LEPTON"
CHARGE = 0.5564
MASS = 1836.15267247
SPIN = -0.5
/
&PARTICLE
NAME = "M-TIP"
SYMBOL = "X1.1-"
CATEGORY = "LEPTON"
CHARGE = -1.1128
MASS = 1836.15267247
MASS = 7294.2994
SPIN = 0.5
/
&PARTICLE
Expand Down
Loading

0 comments on commit 77837ad

Please sign in to comment.