<?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=1830&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Multiwfn forum / Integrating with mixed type grid]]></title>
		<link>http://sobereva.com/wfnbbs/viewtopic.php?id=1830</link>
		<description><![CDATA[The most recent posts in Integrating with mixed type grid.]]></description>
		<lastBuildDate>Wed, 27 May 2026 19:07:16 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Integrating with mixed type grid]]></title>
			<link>http://sobereva.com/wfnbbs/viewtopic.php?pid=5690#p5690</link>
			<description><![CDATA[<p>Hello,</p><p>Your modification on the code is correct.</p><p>PS: A more elegant way is adding your function as a new real space function in functions.f90, and link it into user-defined function (&quot;function userfunc(x,y,z)&quot;); in your function code simply set the returned value to zero if it is found to be &gt;=0.5. In this case you can integrate your function in basin analysis module in terms of integrating user-defined function, any modification of basin.f90 is not needed.</p>]]></description>
			<author><![CDATA[dummy@example.com (sobereva)]]></author>
			<pubDate>Wed, 27 May 2026 19:07:16 +0000</pubDate>
			<guid>http://sobereva.com/wfnbbs/viewtopic.php?pid=5690#p5690</guid>
		</item>
		<item>
			<title><![CDATA[Integrating with mixed type grid]]></title>
			<link>http://sobereva.com/wfnbbs/viewtopic.php?pid=5689#p5689</link>
			<description><![CDATA[<p>Dear Tian Lu.</p><p>I&#039;m faced with the task of integrating existing Bader basins, but in a specific way. The integration needs to be done in a mixed-type grid. For my task, I need to take only those voxels in which the value of my function (below, MYFUNC) is &gt;= 0.5. Am I correct in understanding that I need to add code in two places in the basin.f90 file, namely:<br />1)<br />...<br />!Use DFT integration algorithm to integrate the region inside the trust radius<br />...<br />!$OMP do schedule(DYNAMIC)<br />do ipt=1,nintgrid<br />ptx=gridatt(ipt)%x<br />pty=gridatt(ipt)%y<br />ptz=gridatt(ipt)%z<br />MYFUNC = f(ptx, pty, ptz, &quot;f&quot;) #my function<br />if (MYFUNC &lt; 0.5D0) cycle<br />rx=ptx-CPpos(1,numcp) !The relative distance between the current point and the corresponding attractor<br />ry=pty-CPpos(2,numcp)<br />rz=ptz-CPpos(3,numcp)<br />!Calculate switching function <br />dist=dsqrt(rx*rx+ry*ry+rz*rz)<br />....<br />2)<br />...<br />!--------- Integrating uniform grids, basin boundary grids will be calculated in the later stage<br />!$OMP do schedule(DYNAMIC)<br />do iz=izlow,izup <br />do iy=iylow,iyup <br />do ix=ixlow,ixup <br />if ((itype==2.or.itype==3).and.interbasgrid(ix,iy,iz)) cycle !If refine boundary grid at next stage, we don&#039;t calculate them at present stage <br />call getgridxyz(ix,iy,iz,rnowx,rnowy,rnowz) <br />MYFUNC = f(rnowx, rnowy, rnowz, &quot;f&quot;) <br />if (MYFUNC &lt; 0.5D0) cycle <br />iatt=gridbas(ix,iy,iz)<br />! do icp=1,numcp<br />! dist=dsqrt( (rnowx-CPpos(1,icp))**2+(rnowy-CPpos(2,icp))**2+(rnowz-CPpos(3,icp))**2 )<br />! if (disttest&lt;trustrad(icp)) cycle cycix !The function inside trust radius is integrated by DFT integration<br />! end do<br />rx=rnowx-CPpos(1,iatt) !The relative distance between the current point and the exact position of the corresponding attractor<br />ry=rnowy-CPpos(2,iatt)<br />...</p><p>I would be very grateful if you could tell me if I&#039;m on the right track and if I need to add an &quot;if MYFUNC...&quot; condition somewhere else in the code (When integrating the basin boundary mb?)</p>]]></description>
			<author><![CDATA[dummy@example.com (Alexey)]]></author>
			<pubDate>Wed, 27 May 2026 15:54:55 +0000</pubDate>
			<guid>http://sobereva.com/wfnbbs/viewtopic.php?pid=5689#p5689</guid>
		</item>
	</channel>
</rss>
