Multiwfn forum

Multiwfn official website: http://sobereva.com/multiwfn. Multiwfn forum in Chinese: http://bbs.keinsci.com/wfn

You are not logged in.

#1 Re: Multiwfn and wavefunction analysis » Stress tensor analysis now is available in Multiwfn » 2024-11-19 10:03:40

Professor Tian, thank you very much.

The Multiwfn source code 3.8 (dev) Upload [2024-Nov-13] was uploaded to  https://github.com/aslozada/Stress_tensor/

Best regards,

Asdrubal Lozada

#2 Re: Multiwfn and wavefunction analysis » Stress tensor analysis now is available in Multiwfn » 2024-11-19 01:55:45

Professor Tian, thank you very much.

The bash script to calculate the path-packets can be downloaded from: https://github.com/aslozada/Stress_tens … packets.sh
How to use: bash path-packets.sh <waveFunctionFile>

The script uses the files: CPs.txt and paths.txt, and to visualize can be use VMD in representation CPK


ethene-path-packets.png


Ethene. Path-Packets {q,q´}

Best regards,

Asdrubal Lozada

#3 Re: Multiwfn and wavefunction analysis » Stress tensor analysis now is available in Multiwfn » 2024-11-02 04:28:26

Professor Tian, thank you very much.

An application of the Stress Tensor: The Path-Packet**

** Described in: Jenkins & Kirk: Next Generation Quantum Theory of Atoms in Molecules, 2023

path.png

r_i: position on Bond Path
epsilon_i: stress tensor elllipticity at ri
e2_i: second eigenvector of stress tensor

!!-------- Calculate stress tensor ellipticity
real*8 function stress_ellipticity1(x,y,z)
real*8 x,y,z,mat(3,3),eigval(3),eigvecmat(3,3)
call stress_tensor(x,y,z,mat)
call diagsymat(mat,eigvecmat,eigval,idiagok)
stress_ellipticity=(abs(eigval(1))/abs(eigval(2)))-1
end function




This functions calculates the vector components ellipticity * eigenvector(2)
!!--------Calculate pro path-packets
function pro_path_packets(x,y,z) result(v)
real*8 x,y,z,mat(3,3),eigval(3),eigvecmat(3,3)
real*8 v(3)
call stress_tensor(x,y,z,mat)
call diagsymat(mat,eigvecmat,eigval,idiagok)
stress_ellipticity=(abs(eigval(1))/abs(eigval(2)))-1
v(1)=stress_ellipticity*eigvecmat(1,2)
v(2)=stress_ellipticity*eigvecmat(2,2)
v(3)=stress_ellipticity*eigvecmat(3,2)
end function


Example: Path-Packets for Li-Li Dimer


paths-packets.png


* color blue: P and color red: P'
Currently, the sum r_i + pro_path_packets(x,y,z) is performed separately, using a bash script. And the figure is performed with VMD

#5 Multiwfn and wavefunction analysis » Join degenerate Wavefunctions MO » 2024-07-03 14:43:11

aslozada
Replies: 3

Dear Prof. Tian,

Is there a way in Multiwfn to join two molecular orbitals with "equal" energy values?

In the case of option 19 - -menu 100 -- ("combining fragment wavefunctions"), a new wavefunction is obtained with m orbitals from fragment 1 and n orbitals from fragment 2. However, I am interested in join the coefficients of two orbitals with similar energy into the same orbital.

for example:


join.png

Thank you very much

#6 Re: Multiwfn and wavefunction analysis » How to conduct a stress tensor analysis? » 2024-03-12 01:47:38

Dear Prof. Tian,

Thank you very much for your valuable suggestions.

In the current test version of the patch, the calculation is perform for individual coordinates of the CPs using option 7 of the topology module. Plots along the coordinates were generated through a loop in a external script.

Initially, I attempted to utilize the orbderv subroutine directly. However, a persistent memory-related error appeared when adding new arrays in this subroutine. Consequently, I chose to reuse some of the existing code and create a separate subroutine. Indeed, this decision introduces some redundancy in the code, and an improvement needs to be made.

In the current implementation, for the calculation of the stress tensor matrix, direct access to the values GFTdii and GFTdij (i=x,y,z; j=x,y,z) is required.

#7 Re: Multiwfn and wavefunction analysis » How to conduct a stress tensor analysis? » 2024-03-11 08:56:19

I wrote a patch for the stress tensor matrix calculation by using specific portions of the 'orbderv' subroutine."
The changes are made in the 'function.f90' and 'sub.f90' files.

The following results depict the stiffness and ellipticity calculations of the stress tensor in the biphenyl model. (The wave function has been calculate at the B3LYP/6-311(2d,2p) level)
Ellipticity.png

Stiffness.png

Within the 'function.f90' module, I added three new subroutines: 'orbderv_stress,' 'gencalcstress,' and 'calc_stress.' After attempting to directly implement the changes in 'orbderv' and 'gencalchessmat,' I opted to reuse portions of those codes in the aforementioned subroutines.

You can find the test patch at this link https://github.com/aslozada/Stress_tens … nsor.patch

Use with Multiwfn_3.8_dev_src_Linux

cp Multiwfn-add-stress-tensor.patch Multiwfn_3.8_dev_src_Linux/

patch -s -p0 < Multiwfn-add-stress-tensor.patch

File to patch: function.f90 ... File to patch: sub.f90

#8 Re: Multiwfn and wavefunction analysis » How to conduct a stress tensor analysis? » 2024-02-28 21:01:33

I am performing some extension tests to obtain the stress-tensor matrix, see the code (Reference: Using the gradient expansion model. The Journal of Chemical Physics 130, 154104 (2009); doi: 10.1063/1.3098140 ):

ge.png

!%
!@ ---- Obtain of the electronic stress tensor using
!@ ---- the gradient expansion approximation
!===========================================================
i_matrix = 0.0
st_term  = 0.0

i_matrix(1,1) = 1.0; i_matrix(2,2) = 1.0; i_matrix(3,3) = 1.0

! Electron density using a gradient expansion
coeffs(1) = (-2.0 * (3.0 * pi**2)**(2/3))/10.0
coeffs(2) = (-1.0/36.0)
coeffs(3) = (-1.0/18.0)
coeffs(4) = (1.0/12.0)

st_term(:,:,1) = coeffs(1) * elerho**(5/3) * i_matrix
st_term(:,:,2) = 0.0
st_term(:,:,3) = coeffs(3) * laplfac*(elehess(1,1)+elehess(2,2)+elehess(3,3)) * i_matrix
st_term(:,:,4) = coeffs(4) * funchess

!tensor_stress = st_term(:,:,1)+st_term(:,:,2)+st_term(:,:,3)+st_term(:,:,4)
tensor_stress = 0.0 * st_term(:,:,1)+ 0.0 * st_term(:,:,2)+ 0.0 * st_term(:,:,3) + st_term(:,:,4)
!===========================================================
call diagsymat(tensor_stress,eigvecmat,eigval,idiagok) !More robust
if (idiagok/=0) write(*,*) "Note: Diagonization of stress tensor matrix failed!"
write(ifileid,"(' Eigenvalues of stress tensor:',3E18.10)") eigval(1:3)
write(ifileid,*) "Eigenvectors (columns) of stress tensor matrix:"
write(ifileid,"(3E18.10)") ((eigvecmat(i,j),j=1,3),i=1,3)

if (ifuncsel==1) then !Output stiffness of stress-tensor
    call sort(eigval)
    eigmax=eigval(3)
    eigmed=eigval(2)
    eigmin=eigval(1)
    write(ifileid,"(a,f12.6)") " stiffness of stress-tensor matrix:",abs(eigmin)/abs(eigmax)
    write(ifileid,*) "==================================================="

end if

!%
Example: Stress-tensor Stiffness values: BCP in biphenyl model
stiffness-stress.png

However, I am interested in implementing the stres-tensor model, describe in The Journal of Chemical Physics 134, 234106 (2011) (see equation above). How could I use any of the second derivative matrices already implemented in Multiwfn for this calculation, especially in the case of r´? I appreciate any suggestion on this issue.


bm.png

#9 Re: Multiwfn and wavefunction analysis » How to conduct a stress tensor analysis? » 2024-02-11 00:13:12

Thank you very much for your reply.
To confirm, should all extensions via "main function 2" be performed using "userfunc"?

Of course, Multiwfn

#10 Multiwfn and wavefunction analysis » How to conduct a stress tensor analysis? » 2024-02-10 15:43:45

aslozada
Replies: 10

Hi,
I'm wondering how to conduct a stress tensor analysis within the QTAIM framework using Multiwnf. Any tips?
Checking the Multiwnf manual, I couldn't find anything with those references.

Thanks!

Board footer

Powered by FluxBB