Skip to content

Commit

Permalink
Merge pull request #106 from efposadac/master
Browse files Browse the repository at this point in the history
updating erkale branch
  • Loading branch information
fsmoncadaa authored Dec 3, 2024
2 parents 37ea947 + 77837ad commit 89af5b9
Show file tree
Hide file tree
Showing 147 changed files with 20,350 additions and 14,130 deletions.
146 changes: 108 additions & 38 deletions bin/lowdin
Original file line number Diff line number Diff line change
Expand Up @@ -177,32 +177,41 @@ if [ $extFile="lowdin" ]; then
'{
printf("\n&InputParticle\n\tInputParticle_name = \"%s\"\n\tInputParticle_basisSetName = \"%s\"\n",toupper($1),toupper($2))
for(i=1;i<=NF;i++){
if($i=="addParticles"){
if(toupper($i)==toupper("addParticles")){
printf("\tInputParticle_addParticles = %s\n",toupper($(i+2)) )
}
else if($i=="multiplicity"){
else if(toupper($i)==toupper("multiplicity")){
printf("\tInputParticle_multiplicity = %s\n",toupper($(i+2)) )
}
else if($i=="fix"){
else if(toupper($i)==toupper("fix")){
printf("\tInputParticle_fixedCoordinates = %s\n",toupper($(i+2)) )
}
else if($i=="fragmentNumber"){
else if(toupper($i)==toupper("fragmentNumber")){
printf("\tInputParticle_fragmentNumber = %s\n",toupper($(i+2)) )
}
else if($i=="translationCenter"){
else if(toupper($i)==toupper("translationCenter")){
printf("\tInputParticle_translationCenter = %s\n",toupper($(i+2)) )
}
else if($i=="rotationPoint"){
else if(toupper($i)==toupper("rotationPoint")){
printf("\tInputParticle_rotationPoint = %s\n",toupper($(i+2)) )
}
else if($i=="rotateAround"){
else if(toupper($i)==toupper("rotateAround")){
printf("\tInputParticle_rotateAround = %s\n",toupper($(i+2)) )
}
else if($i=="q"){
else if(toupper($i)==toupper("q")){
printf("\tInputParticle_charge = %s\n",toupper($(i+2)) )
}
else if($i=="m"){
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)) )
}
else if(toupper($i)==toupper("qdoCenterOf")){
printf("\tInputParticle_qdoCenterOf = \"%s\"\n",toupper($(i+2)) )
};
};
printf("\tInputParticle_origin = %15.12E %15.12E %15.12E \n/\n",$3,$4,$5)
Expand Down Expand Up @@ -285,28 +294,67 @@ if [ $extFile="lowdin" ]; then
'{
printf("\n&Output\n")
for(i=1;i<=NF;i++){
if($i=="species"){
if(toupper($i)==toupper("species")){
printf("\tOutput_species = %s\n",$toupper((i+2)) )
}
else if($i=="orbital"){
printf("\tOutput_orbital = %s\n",$toupper((i+2)) )
else if(toupper($i)==toupper("plane")){
printf("\tOutput_plane = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("axis")){
printf("\tOutput_axis = %s\n",$toupper((i+2)) )
}
else if($i=="state"){
else if(toupper($i)==toupper("state")){
printf("\tOutput_state = %s\n",$toupper((i+2)) )
}
else if($i=="dimensions"){
else if(toupper($i)==toupper("orbital")){
printf("\tOutput_orbital = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("dimensions")){
printf("\tOutput_dimensions = %s\n",$toupper((i+2)) )
}
else if($i=="cubeSize"){
else if(toupper($i)==toupper("pointsPerDim")){
printf("\tOutput_pointsPerDim = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("scanStep")){
printf("\tOutput_scanStep = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("cubeSize")){
printf("\tOutput_cubeSize = %s\n",$toupper((i+2)) )
}
else if($i=="point1"){
else if(toupper($i)==toupper("minValue")){
printf("\tOutput_minValue = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("maxValue")){
printf("\tOutput_maxValue = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("offsetX")){
printf("\tOutput_offsetX = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("offsetY")){
printf("\tOutput_offsetY = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("offsetZ")){
printf("\tOutput_offsetZ = %s\n",$toupper((i+2)) )
}
else if(toupper($i)==toupper("limitX")){
printf("\tOutput_limitX = %15.12E %15.12E \n",$(i+2),$(i+3))
}
else if(toupper($i)==toupper("limitY")){
printf("\tOutput_limitY = %15.12E %15.12E \n",$(i+2),$(i+3))
}
else if(toupper($i)==toupper("limitZ")){
printf("\tOutput_limitZ = %15.12E %15.12E \n",$(i+2),$(i+3))
}
else if(toupper($i)==toupper("center")){
printf("\tOutput_center = %15.12E %15.12E %15.12E \n",$(i+2),$(i+3),$(i+4))
}
else if(toupper($i)==toupper("point1")){
printf("\tOutput_point1 = %15.12E %15.12E %15.12E \n",$(i+2),$(i+3),$(i+4))
}
else if($i=="point2"){
else if(toupper($i)==toupper("point2")){
printf("\tOutput_point2 = %15.12E %15.12E %15.12E \n",$(i+2),$(i+3),$(i+4))
}
else if($i=="point3"){
else if(toupper($i)==toupper("point3")){
printf("\tOutput_point3 = %15.12E %15.12E %15.12E \n",$(i+2),$(i+3),$(i+4))
};
};
Expand All @@ -318,16 +366,16 @@ if [ $extFile="lowdin" ]; then
'{
printf("\n&InputCINamelist\n")
for(i=1;i<=NF;i++){
if($i=="species"){
if(toupper($i)==toupper("species")){
printf("\tInputCI_species = %s\n",$toupper((i+2)) )
}
else if($i=="core"){
else if(toupper($i)==toupper("core")){
printf("\tInputCI_core = %s\n",$toupper((i+2)) )
}
else if($i=="active"){
else if(toupper($i)==toupper("active")){
printf("\tInputCI_active = %s\n",$toupper((i+2)) )
}
else if($i=="excitation"){
else if(toupper($i)==toupper("excitation")){
printf("\tInputCI_excitation = %s\n",$toupper((i+2)) )
};
};
Expand All @@ -336,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 @@ -352,10 +400,27 @@ if [ $extFile="lowdin" ]; then
fi
gawk '($1~/BASIS/ && toupper($2)~/^'$BASIS_NAME'$/){flag=1; next}
($0~/END/){flag=0};
(flag==1){print toupper($0)}' $nameFile > $LOWDIN_DATA/basis/$BASIS_NAME
(flag==1){print toupper($0)}' $nameFile > $BASIS_NAME.$PID
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 @@ -376,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 @@ -387,12 +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

if [ -e $nameFile.gms.bs ]
cp $nameFile*.gms.bs $LOWDIN_SCRATCH/$nameFile &> /dev/null

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

if [ ${#POTENTIALS_NAMES[@]} -gt "0" ]
then
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 @@ -462,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 All @@ -486,15 +565,6 @@ if [ $extFile="lowdin" ]; then
rm -rf $LOWDIN_SCRATCH/$nameFile
fi

### Clean custom basis files
if [ ${#BASIS_NAMES[@]} -gt "0" ]
then
for BASIS_NAME in ${BASIS_NAMES[@]}
do
rm $LOWDIN_DATA/basis/$BASIS_NAME
done
fi

else
echo $1 ", this file does not exist. "
exit 1
Expand Down
24 changes: 23 additions & 1 deletion lib/basis/AUG-CC-PVTZ
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,29 @@ O-HYDROGEN EA- (AUG-CC-PVTZ) BASIS TYPE: 1
9 2 1
0.24700000 1.00000000


O-HYDROGEN EB- (AUG-CC-PVTZ) BASIS TYPE: 1
#
9
1 0 3
33.87000000 0.00606800
5.09500000 0.04530800
1.15900000 0.20282200
2 0 1
0.32580000 1.00000000
3 0 1
0.10270000 1.00000000
4 0 1
0.02526000 1.00000000
5 1 1
1.40700000 1.00000000
6 1 1
0.38800000 1.00000000
7 1 1
0.10200000 1.00000000
8 2 1
1.05700000 1.00000000
9 2 1
0.24700000 1.00000000

O-HELIUM HE (AUG-CC-PVTZ) BASIS TYPE: 1
#
Expand Down
44 changes: 0 additions & 44 deletions lib/basis/H2O-1S1P1D

This file was deleted.

14 changes: 14 additions & 0 deletions lib/basis/NAKAI-CC-PVDZ
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
O-HYDROGEN H (CC-PVDZ) BASIS TYPE: 1
#
5
1 0 1
13.01000000 1.0
2 0 1
1.96200000 1.0
3 0 1
0.44460000 1.0
4 0 1
0.12200000 1.00000000
5 1 1
0.72700000 1.00000000

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
Loading

0 comments on commit 89af5b9

Please sign in to comment.