<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://sobereva.com/wfnbbs/extern.php?action=feed&amp;tid=1472&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Multiwfn forum / promolecule]]></title>
		<link>http://sobereva.com/wfnbbs/viewtopic.php?id=1472</link>
		<description><![CDATA[The most recent posts in promolecule.]]></description>
		<lastBuildDate>Sun, 21 Jul 2024 13:27:24 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: promolecule]]></title>
			<link>http://sobereva.com/wfnbbs/viewtopic.php?pid=4414#p4414</link>
			<description><![CDATA[<p>Please notice &quot;ispheratm&quot; in settings.ini. If you set it to 0, atomic wavefunction files will not be automatically sphericalized.</p>]]></description>
			<author><![CDATA[dummy@example.com (sobereva)]]></author>
			<pubDate>Sun, 21 Jul 2024 13:27:24 +0000</pubDate>
			<guid>http://sobereva.com/wfnbbs/viewtopic.php?pid=4414#p4414</guid>
		</item>
		<item>
			<title><![CDATA[promolecule]]></title>
			<link>http://sobereva.com/wfnbbs/viewtopic.php?pid=4412#p4412</link>
			<description><![CDATA[<p>Hello! i need to use aspherical atomic density to build promolecular density, but i dont understand how to do it, because function 100(hidden option) &gt; 10 give spherical avaraged density even if i use atom.wfn file with aspherical density. i rewrote subroutine sphatmraddens to get values for all (r;theta;phi) points, but i dont understand how to use this data for building promolecular density. i attach my code and file density.txt for some atom which i get with the help of my code. should i create new lagintpol in (r,theta,phi) space to use my data in building promolecular density with calcprodens(x,y,z,0)? or what? help me please</p><div class="codebox"><pre class="vscroll"><code>subroutine sphatmraddens
    use defvar
    use util
    use functions
    implicit real*8 (a-h,o-z)
    
    ! Declare variables
    real*8, allocatable :: radx(:), rady(:), radz(:), radpos(:), density(:)
    integer :: ntheta, nphi
    real*8 :: theta, phi
    integer :: irad, itheta, iphi, idx
    real*8 :: rad, x, y, z
    integer :: ifinish, iprogstp, iprogcrit, nradpt
    integer :: itmp
    parameter (truncrho = 1D-8, rlow = 0D0, rhigh = 12D0, nradpt = 200, ntheta = 50, nphi = 100)
    
    ! Allocate arrays
    allocate(radx(nradpt), rady(nradpt), radz(nradpt), radpos(nradpt), density(nradpt*ntheta*nphi))
    
    ifinish = 0
    iprogstp = 20
    iprogcrit = iprogstp
    write(*,*) &quot;Calculating...&quot;

    ! Parallel loop
    !$OMP PARALLEL DO SHARED(density, radpos, ifinish, iprogcrit) PRIVATE(irad, itheta, iphi, rad, x, y, z, theta, phi, idx) schedule(dynamic) NUM_THREADS(nthreads)
    do irad = 1, nradpt
        rad = rlow + (rhigh - rlow) * (irad - 1) / (nradpt - 1)
        radpos(irad) = rad

        do itheta = 0, ntheta-1
            theta = pi * itheta / (ntheta - 1) ! theta ranges from 0 to pi

            do iphi = 0, nphi-1
                phi = 2 * pi * iphi / nphi ! phi ranges from 0 to 2*pi

                x = rad * sin(theta) * cos(phi)
                y = rad * sin(theta) * sin(phi)
                z = rad * cos(theta)
                idx = (irad - 1) * ntheta * nphi + itheta * nphi + iphi + 1
                
                ! Compute density
                density(idx) = fdens(x, y, z)
                
            end do
        end do

        ifinish = ifinish + 1
        if (ifinish &gt;= iprogcrit) then
            call showprog(ifinish, nradpt)
            iprogcrit = iprogcrit + iprogstp
        end if
    end do
    !$OMP END PARALLEL DO

    ! Output results
    open(10, file=&quot;density.txt&quot;, status=&quot;replace&quot;)
    itmp = 0
    do irad = 1, nradpt
        do itheta = 0, ntheta-1
            theta = pi * itheta / (ntheta - 1)
            do iphi = 0, nphi-1
                phi = 2 * pi * iphi / nphi
                idx = (irad - 1) * ntheta * nphi + itheta * nphi + iphi + 1
                if (density(idx) &gt; truncrho) then
                    itmp = itmp + 1
                    write(10, &quot;(&#039;    r=&#039;, f12.6, &#039; theta=&#039;, f12.6, &#039; phi=&#039;, f12.6, &#039; density=&#039;, f25.10, &#039;D0&#039;)&quot;) radpos(irad), theta, phi, density(idx)
                end if
            end do
        end do
    end do
    close(10)

    write(*,*) &quot;The result has been output to density.txt in the current folder&quot;
end subroutine sphatmraddens</code></pre></div><p>i get correct values for all (r,theta,phi) points with this code, but i need to construct density with this values (do not pay attention that the density values are small, in my case it should be so)<br />file: <a href="https://drive.google.com/file/d/136n0jNUL0YWugBOXsDM-Cc1sIyznUKMu/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/136n0jN … sp=sharing</a><br />p.s. may be my way to build promolecular density with aspherical atomic densities is bad? is there other way to do it?<br />i need to use molecule.xyz input and then analyze promolecular density, so 1000&gt;17 doesnt suit me because i need molecule.wfn file for it</p>]]></description>
			<author><![CDATA[dummy@example.com (Alexey)]]></author>
			<pubDate>Sat, 20 Jul 2024 19:27:14 +0000</pubDate>
			<guid>http://sobereva.com/wfnbbs/viewtopic.php?pid=4412#p4412</guid>
		</item>
	</channel>
</rss>
