diff --git a/src/M3C.analysis b/src/M3C.analysis index fd5ce9d..bdf616a 100755 --- a/src/M3C.analysis +++ b/src/M3C.analysis @@ -1686,6 +1686,8 @@ function averReactionsDiagram() local eDistfile=`getValueFromIFIle ${iFile%.*}.m3c FIT_BRANCHING_RATIOS:eDistfile` echo "strict digraph G {" > .dataReac-$$.dot +# echo "overlap=scalexy; //false, compress, ..." >> .dataReac-$$.dot +# echo "sep=\"+1\"; // 0.1, +1" >> .dataReac-$$.dot echo " rankdir=LR" >> .dataReac-$$.dot echo " node [shape=box,style=filled,fillcolor=yellow,color=black]" >> .dataReac-$$.dot @@ -1695,7 +1697,7 @@ function averReactionsDiagram() weight=`n1df.evaluate $eDistfile $E` grep ".*(.*\-\->" $f \ - | awk '{$1=$1*$weight; print $0}' \ + | awk '{$1=$1*'"$weight"'; print $0}' \ | sed -E 's/\([[:alnum:]]+\)//g' \ | awk '{r=$2;split($2,arr,"-->"); if( arr[1]!=arr[2] ) print $0}' done ) | \ @@ -1707,7 +1709,29 @@ function averReactionsDiagram() for(k in map) if( map[k]/sum > '$maxP' ) printf "%10.5f %s\n", map[k]/sum, k - }' | sed 's/-->/"->"/g' \ + }' \ + | gawk ' + { + r=$2 + split($2,arr,"-->") + line[arr[1]"-->"arr[2]]=$1 + + if( arr[2]"-->"arr[1] in line ){ + if( $1 > line[arr[2]"-->"arr[1]] ){ + delete line[arr[2]"-->"arr[1]] + }else{ + delete line[arr[1]"-->"arr[2]] + } + } + } + END{ + for( k in line ){ + print line[k], k + print line[k], k > "/dev/stderr" + } + } + ' \ + | sed 's/-->/"->"/g' \ | gawk ' { print "\""$2"\"", "[label="$1",fontcolor=blue]" @@ -2062,8 +2086,8 @@ EOF smoothStrength=4e3 # smoothThr="1e-9" smoothThr="1e-4" - errFact=0.1 # << SSeq -# errFact=1.0 # << Srand +# errFact=0.1 # << SSeq + errFact=1.0 # << Srand # if [ "`echo "${keys[$(($i-1))]}" | sed 's/\// /g' | wc -w`" -eq 3 ] # then @@ -2590,6 +2614,7 @@ function channelBRDiagram() '"`cat $M3C_HOME/utils/M3CUtils.gawk`"' # Debería ser la anterior linea, pero solo está disponible para gawk >= 2011 ($1!~/^#/){ print reduceM3CLabel($1), $2, $3, $4 +# print reduceM3CLabel($1), $2, 0.0, 0.0 }' tmp-$$ > $BRFile rm tmp-$$ @@ -2600,6 +2625,7 @@ function channelBRDiagram() sed -i -r '{s/([[:alpha:]]+)p/\1^{+}/g}' $BRFile # Escribir bien los superindices, caso Cp(??) sed -i -r '{s/([[:alpha:]]+)([[:digit:]]+)/\1_{\2}/g}' $BRFile # Escribir bien los superindices, caso C_2(??) + cat $BRFile yMax=`gawk '($0!~/#/){printf "%s\n%s\n",$2,$3}' $BRFile | sort -k 1 -n | tail -n1` yErrorMax=`gawk '($0!~/#/){printf "%s\n",$4}' $BRFile | sort -k 1 -n | tail -n1` yMax=`echo "$yMax+$yErrorMax" | bc -l` diff --git a/src/M3C.viewXYZ b/src/M3C.viewXYZ index 0092c5f..e21c62e 100755 --- a/src/M3C.viewXYZ +++ b/src/M3C.viewXYZ @@ -78,13 +78,13 @@ function convertImage() local iFile=$1 local oFile=$2 - if [ "$CONVERTER" = "convert" ] - then +# if [ "$CONVERTER" = "convert" ] +# then convert $iFile $oFile > /dev/null 2>&1 - elif [ "$CONVERTER" = "inkscape" ] - then - inkscape -z -f $iFile -E $oFile > /dev/null 2>&1 - fi +# elif [ "$CONVERTER" = "inkscape" ] +# then +# inkscape -z -f $iFile -E $oFile > /dev/null 2>&1 +# fi } ## diff --git a/src/Makefile b/src/Makefile index 42cb565..ce81978 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,7 @@ FCFLAGS = -static -static-intel -static-libgcc -traceback -w -I. -g -fpp -mkl -I LDFLAGS = -L${HOME}/Develop/scift/src -lscift TLIB = -all: AzizSlamanPotential.o Fragment.o FragmentsDB.o FragmentsListBase.o FragmentsList.o GOptionsM3C.o MarkovChain.o ModelPotential.o NNLS.o Reactor.o $(TLIB) M3CBR M3C M3CfitBR +all: AzizSlamanPotential.o Fragment.o FragmentsDB.o FragmentsListBase.o FragmentsList.o GOptionsM3C.o MarkovChain.o ModelPotential.o NNLS.o Reactor.o $(TLIB) M3CBR M3C M3CfitBR molecule.ZPE AzizSlamanPotential.o azizslamanpotential_.mod: AzizSlamanPotential.f90 fmake @@ -61,6 +61,11 @@ ModelPotential.o modelpotential_.mod: ModelPotential.f90 goptionsm3c_.mod azizsl echo -n 'Building ModelPotential.f90 ' time -f "(%E)" $(FC) $(FCFLAGS) -c ModelPotential.f90 +molecule.ZPE: molecule.ZPE.f90 Fragment.o GOptionsM3C.o fragment_.mod goptionsm3c_.mod + fmake + echo -n 'Building molecule.ZPE.f90 ' + time -f "(%E)" $(FC) $(FCFLAGS) molecule.ZPE.f90 Fragment.o GOptionsM3C.o -o molecule.ZPE $(LDFLAGS) + NNLS.o nnls_.mod: NNLS.f90 fmake echo -n 'Building NNLS.f90 ' @@ -72,10 +77,10 @@ Reactor.o reactor_.mod: Reactor.f90 fragment_.mod azizslamanpotential_.mod gopti time -f "(%E)" $(FC) $(FCFLAGS) -c Reactor.f90 clean: - rm -f *.o *.mod *~ .deps M3CBR M3C M3CfitBR 2> /dev/null + rm -f *.o *.mod *~ .deps M3CBR M3C M3CfitBR molecule.ZPE 2> /dev/null distclean: - rm -f *.o *.mod *~ .deps Makefile M3CBR M3C M3CfitBR 2> /dev/null + rm -f *.o *.mod *~ .deps Makefile M3CBR M3C M3CfitBR molecule.ZPE 2> /dev/null Makefile: .deps fmake diff --git a/src/molecule.ZPE.f90 b/src/molecule.ZPE.f90 index 8bce102..3705228 100644 --- a/src/molecule.ZPE.f90 +++ b/src/molecule.ZPE.f90 @@ -50,6 +50,7 @@ program main character(1000) :: sBuffer type(String) :: iFileName type(Fragment) :: mol + real(8) :: ZPE if( command_argument_count() < 1 ) then write(*,*) "## ERROR ## Number of Parameter == 1" @@ -62,5 +63,11 @@ program main call mol.init() call mol.loadRXYZ( iFileName.fstr ) - write(*,"(F20.5,A)") mol.ZPE/eV, " eV" + ZPE = 0.0_8 + if( mol.nAtoms() > 1 ) then + ZPE = sum( merge(mol.vibFrequencies, 0.0_8,mol.vibFrequencies>0.0_8) )/2.0_8 + end if + +! write(*,"(F20.5,A)") mol.ZPE/eV, " eV" + write(*,"(F20.5,A)") ZPE/eV, " eV" end program main