以下是北京科音近期举办的培训以及未来要举办的培训的预告。培训地点皆为北京,全部由博主Sobereva讲授。不方便到现场参加,或者等不及参加下一届培训者,也可以向北京科音官方购买往届培训资料自学,请见以下培训班介绍页面里的购买说明,费用可以开具发票以供报销。
强烈建议关注“北京科音”微信公众号获取未来将要举办的培训的提醒。与培训各种有关的常见问题,诸如举办时间、报名方式等,请参阅《北京科音办的培训班FAQ》(http://www.keinsci.com/FAQ.html),若看过后还有不清楚的,可发邮件至北京科音官方邮箱keinsci[at]sina.com咨询。
提醒:目前社会上黑心山寨计算化学相关培训极多,通过QQ群、电子邮件肆意滥发广告,望广大研究者切勿病急乱投医,否则又浪费时间又白花钱还打击做计算模拟研究的信心,强烈建议阅读《辨别山寨坑钱科研培训的关键九点》(//www.umsyar.com/339)增强辨别能力!
]]>文/Sobereva@北京科音 2026-Jan-13
Multiwfn 3.7是于2020年8月14日发布的,之后笔者开始开发Multiwfn 3.8。在过去的5年多里Multiwfn 3.8的开发版(development version)在Multiwfn官网//www.umsyar.com/multiwfn上频繁更新(甚至有时一天就更新两次),累积已经被更新了好几百次,名字都叫Multiwfn 3.8(dev),官网的下载页面上和Multiwfn启动后屏幕上的提示都非常明确地显示了更新日期(last update),显然不说更新日期而只说Multiwfn 3.8(dev)是毫无意义的。
Multiwfn 3.8已经于2026年1月7日正式在官网上发布!相对于3.7的海量更新见后文。每次更新后在官网的Update history页面都能看到更新内容。大部分这些更新都早已体现在笔者在计算化学公社论坛(http://bbs.keinsci.com/forum.php)和思想家公社QQ群(//www.umsyar.com/QQrule.html)中笔者的答疑里、体现在笔者过去五年多来写过的好几十篇Multiwfn相关博文里(汇总见《Multiwfn入门tips》//www.umsyar.com/167)、体现在过去很多届的北京科音 波函数分析与Multiwfn程序培训班(http://www.keinsci.com/WFN)的课程内容里,以及体现在2025年8月发表的Multiwfn最新介绍文章J. Chem. Phys., 161, 082503 (2024) DOI: 10.1063/5.0216272里。
为了在未来令Multiwfn既便于频繁更新同时也便于用户区分版本、免得需要提及开发版的更新日期,未来Multiwfn的版本不再采用频繁更新的开发版累积到一定程度后发布正式版的形式,而是以更新日期直接命名。例如Multiwfn在2026年1月12日发布的版本(目前已发布)直接就叫Multiwfn 2026.1.12,对应的Windows版可执行程序压缩包名字为Multiwfn_2026.1.12_bin_Win64.rar,解压后得到的目录为Multiwfn_2026.1.12_bin_Win64,因而直接根据压缩包名和目录名就可以区分具体版本。
在未来官网上的Multiwfn的手册不会像程序版本更新频率那么高,比如仅修复一个bug不会同步更新手册。
目前的官网上的下载页面截图:
根据Google学术,Multiwfn如今已被学术文章引用约四万次,在此顺带感谢广大Multiwfn用户过往对程序开发的支持,以及在发表的文章中正确引用Multiwfn启动后提示的两篇程序介绍原文(2012年JCC文章和2024年JCP文章,应同时引用)。
附:Multiwfn 3.8相对于3.7的所有新功能、改变/改进、bug修正、手册更新。方框里是相应日期的Multiwfn 3.8(dev)版所做的改变
[2025-Dec-7] Now the electronic excitation analyses that rely on orbital wavefunctions and configuration coefficients, such as hole-electron, IFCT, CTS, NTO analysis, etc. can be exactly carried out in combination with TDDFT calculation of ORCA since version 6.1.1. See Section 3.21.A.2 of Multiwfn manual for details, and it is suggested to check blog article "Method of performing hole-electron and relevant analyses via Multiwfn in combination with TDDFT calculation of ORCA" (//www.umsyar.com/758).
[2025-Nov-23] (IMPORTANT) Speed of mIGM/IGMH/IGM analysis has been significantly improved for periodic systems!
[2025-Nov-23] A trick now is available for significantly reducing cost of IGMH analysis between fragments. See updated manual section 4.20.11 for details.
[2025-Nov-11] In the color selection interface, now one can choose user-defined color 1, 2, 3, which can be customized by user1RGB, user2RGB, user3RGB in settings.ini.
[2025-Aug-14] In the post-processing menu of main function 12, after choosing "Output surface properties of each atom" or "Output surface properties of specific fragment", locsurf.pqr instead of locsurf.pdb now is exported. In the .pqr file, residue index corresponds to attribution of surface facets, while atomic charge field (the third last column) corresponds to the mapped function value in a.u.
[2025-Jul-29] New option "13 Invert gradient vectors" has been added to post-processing menu of plotting gradient line map in main function 4.
[2025-Jul-14] Subfunction 5 of main function 300 was originally designed for calculating dipole and multipole moments based on wavefunction. Now, if .chg or .pqr file is used as input, it can also calculate these quantities but based on the atomic charges recorded in the file.
[2025-Jun-10] The first-hyperpolarizability two-level and three-level analysis module in Multiwfn is greatly improved, the usage becomes significantly more convenient. See updated Section 4.24.2.2 of Multiwfn manual for application example.
[2025-Apr-26 to 28 & Jun-4] (IMPORTANT) Now in the GUI window of Multiwfn, one can use the left mouse button to drag the system to freely rotate it. In addition, with holding the Ctrl key and dragging the system horizontally and vertically using left mouse button, one can rotate the system along the screen and zoom in/out the system, respectively. With holding the Shift key and dragging the system using left mouse button, the system can be translated in the drawing region. These improvements make changing viewpoint significantly easier! Note that for Linux version, before dragging the system to change viewpoint, one should click drawing region once to make icon become a hand.
[2025-Apr-5] Turbomole coordination file has been supported as input file, which can provide atomic information and cell information to Multiwfn. See Section 2.5 of Multiwfn manual.
[2025-Apr-5] When exporting Dalton input file (.dal and .mol) by option 19 of subfunction 2 of main function 100, if basis function information is currently available, then the wavefunction will be written into the .dal file, which can be directly used as initial guess. So, you can use e.g. Gaussian or ORCA to obtain orbital wavefunctions, and use them as initial guess for subsequent Dalton calculations! See "Using Multiwfn to take orbitals generated by other programs as initial guess in Dalton calculations" (//www.umsyar.com/740) for detailed information.
[2025-Jan-5] Computational speed of averaged IGM (aIGM) has been increased by an order of magnitude.
[2024-Dec-2] Attractors/basins now can be saved and loaded in basin analysis module. Specifically, once attractors/basins have been generated by option 1 in basin analysis module, one can choose the new option -45 to export grid data as basinana.cub and export attractor/basin information as basinana.txt. In the next time of using Multiwfn to perform the basin analysis, if these two files are found in current folder when choosing option 1, you can input y to ask Multiwfn to directly load the grid data and attractors/basins, therefore fully avoid the time cost for regeneration of the attractors/basins.
[2024-Oct-10] Multiwfn now is able to plot VCD spectrum based on ORCA output file (use %freq doVCD true end when performing frequency analysis), and Multiwfn has better compatibility with ORCA 6 in plotting electronic spectrum.
[2024-Sep-10] For molden files generated by ORCA since 6.0, when pseudopotential is used, users no longer need to manually modify the molden file to specify correct (effective) nuclear charges, because Multiwfn will load [Pseudo] field from the file, which provides this information.
[2024-Aug-15] Default font for plotting curve, plane and isosurface maps has been changed, which looks much better than before. In addition, a new parameter "ttfontfile" has been added to settings.ini, by which one can specify the font file (.ttf) used for plotting the maps.
[2024-Jul-29] Spectrum plotting module has supported ORCA 6.0.
[2024-Jul-12] f-type spherical-harmonic basis functions have been supported in exporting NBO .47 file.
[2024-Jun-25] The code for generating LI and DI based on AOM has been parallelized.
[2024-Jun-16] User-defined functions -1 (trilinear interpolation from grid data) and -3 (3D cubic B-spline interpolation from grid data) have supported periodic boundary condition. See newly added comment about these functions in corresponding part of Section 2.7 of manual.
[2024-Jun-10] Fuzzy analysis module now is able to calculate AOM, LI and DI for periodic wavefunctions. Fuzzy bond order in main function 9 now is available for periodic systems (using Hirshfeld partition). NAdO, BOD and AV1245 analyses have supported periodic wavefunctions.
[2024-Jun-9] OPDOS between all nearest atoms now can be plotted in main function 10 by option 00 (which is visible if you have not defined any fragment).
[2024-Jun-4] Charge decomposition analysis (CDA) has supported periodic wavefunction.
[2024-Jun-4] Biorthogonalization now supports periodic wavefunction.
[2024-Jun-1] Search of critical points by option 3 in main function 2 now loop all image atoms. Images of critical points and topology paths at cell boundary are shown by default now. AIM_PBC.bat and AIM_PBC.txt have been added to examples\scripts\ folder, which play the same role of AIM.bat and AIM.txt but work specifically for periodic systems, not only unique but also image atoms, critical points and topology paths at cell boundary are exported by Multiwfn via this script, making visualization effect of topology analysis in VMD more satisfactory.
[2024-May-24] Fuzzy analysis module (main function 15) now supports integrating real space functions in Hirshfeld/Hirshfeld-I/MBIS atomic spaces for periodic wavefunctions.
[2024-May-22] LOBA analysis now is available for periodic wavefunctions to study oxidation state of periodic systems.
[2024-May-22] Orbital composition now can be derived by Hirshfeld method for periodic wavefunctions. In addition, for periodic systems Hirshfeld method now can be used for producing the orbital compositions used in PDOS map plotting, IFCT analysis, CTS analysis, evaluation of atomic contributions to hole and electron.
[2024-May-21] (IMPORTANT) Hirshfeld, Hirshfeld-I, CM5, and MBIS atomic charges now have well supported periodic systems, based on evenly distributed integration grids. Two kinds of input file can be used: (1) Periodic wavefunction representing valence electrons, namely .molden file from GPW calculation of CP2K, only gamma point is possible. See Section 2.9.2.1 of Multiwfn manual on how to generate it. (2) Grid data file of valence electron density, usually the .cube exported by GPW calculation of CP2K (k-points can be considered). Note that you need to manually edit it to fill actual nuclear charge of every atom.
[2024-May-10] Calculation of MBIS charges has supported elements heaver than Ar (up to Rn currently), and the case of employing pseudopotential has been supported. Population and width of shells (represented by Slater funtions) now can be outputted (in the MBIS charge calculation interface, choose option -2).
[2024-Apr-4] User-defined functions -1 and -3 (interpolation based on grid data) now are compatible with main function 5, that means you can use this function to calculate grid data based on interpolation from an external grid data covering larger area.
[2024-Mar-29] In the post-processing menu of IRI analysis, a new option "9 Screen out covalent bond regions (set IRI to 100 for regions with sign(lambda2)rho < -0.1 a.u.)" is added. After choosing this option to modify grid data and then plot IRI map by VMD as usual, chemical bonds will not visible. Therefore, IRI analysis can fully replace the role of RDG/NCI analysis.
[2024-Mar-22] Calculation efficiency of MBIS charge has been significantly improved, now it can easily calculate large system. Thanks Frank Jensen for contributing the new code.
[2024-Feb-25] In the module of conceptual density functional theory, now condensed local hyper-softness is also printed in option "2 Calculate various quantitative indices". The way of calculating local hyper-softness (see J. Math. Chem., 62, 461 (2024) for introduction) is illustrated in Section 4.22.3 of manual.
[2024-Feb-21] Scaled energy density density is added as the -11th user-defined function. Integral of this function over the whole space is exactly identical to the electronic energy printed by quantum chemistry code because actual virial ratio is introduced in its definition. See corresponding description in Section 2.7 of manual for detail. The value of this function is illustrated by deriving atomic contributions to total energy in Section 4.17.9 of manual.
[2024-Feb-20] These functions in electron excitation analysis module (main function 18) now have supported periodic systems: "Calculate interfragment charge transfer via IFCT method", "Calculate Mulliken atomic transition charges", "Charge-transfer spectrum (CTS) analysis"
[2024-Feb-19] In domain analysis module (subfunction 14 of main function 200), the integrand now can also be chosen as the grid data recorded in a .cub file, you will be asked to input the path of .cub file.
[2024-Feb-18] Initial charges of PEOE charge calculation now can be manually set by providing a file named PEOEinit.txt in current folder, see Section 3.19.7 of manual. The default rule of setting initial charge of deprotonated carboxyl group is changed.
[2024-Feb-16] Slight improvement on Hirshfeld surface analysis: (1) Parallelize fingerprint map analysis to reduce computational cost. (2) In main function 12, when choose surface definition to Hirshfeld surface, mapped function will be automatically switched to electron density (older versions defaults to d_norm), and user will no longer be explicitly asked to choose the way of providing density of isolated atoms during analysis. (3) Color scale of local fingerprint map now is consistent with that of full fingerprint map (4) Becke surface now is constructed by Becke weight based on covalent radii instead of averaged radii of each row as older versions. Section 3.15.5, 4.12.5 and 4.12.6 of manual have been updated.
[2023-Dec-25] In quantitative molecular surface analysis module, skewness is automatically printed after calculation, which is a measure of the asymmetry of real space function distribution over molecular surface. See updated Section 3.15.1 of Multiwfn manual for detail.
[2023-Nov-10] Grid data interpolation functions (user-defined functions -1 and -3, corresponding to trilinear and B-spline interpolations, respectively), now support non-orthogonal grid data. Older version only supports orthogonal grid data.
[2023-Sep-28] Output file of SOC-TDDFT calculation of CP2K now can be used as input file for plotting UV-Vis spectrum via main function 11, thus the influence due to spin-orbit coupling on UV-Vis spectrum can be properly taken into account.
[2023-Aug-12] Energies of NAdO orbitals now can be calculated. In the BOD/NAdO interface, just select the newly added option -1, and choose a way of providing Fock/KS matrix, then energies will be automatically calculated during generation of NAdOs. Example has been added to Section 4.200.20.3.
[2023-Aug-7] In main function 4 (plotting plane map), mode 8 is added to define a plotting plane above or below a fitting plane of specific atoms, this mode is very useful to study function distribution above or below a ring. See Section 3.5.2 of manual for introduction of this mode.
[2023-Jul-28] Element van der Waals radii now can be customized via "vdwrfile" in settings.ini. It affect the atomic sizes in GUI window and some analysis results.
[2023-Jun-4] Calculation speed of STM map (subfunction 4 of main function 300) for periodic system has been significantly improved.
[2023-May-23] Option 21 of topology analysis module has been extended, now it is able to calculate gradient and curvature of electron density along arbitrary given direction.
[2023-May-18] Local electron attachment energy proposed in J. Phys. Chem. A, 120, 10023 (2016) has been supported as -27th user-defined function. See Section 4.12.13 for example of its analysis on molecular surface.
[2023-May-11] Option 2 of subfunction 17 of main function 13 has been largely extended. Now it can obtain statistic information of present grid data in spherical, cylindrical or rectangle region and within specific value range defined by users (Old versions only support rectangle region). See Section 4.13.8 for application example.
[2023-Apr-23] Input file of Quantum ESPRESSO now can be used as input file, which can provide atom and cell information.
[2023-Apr-17] When picking out AdNDP orbitals via option 10 in AdNDP module, now user can input e.g. 3,5,10-13,26-30 to pick out candidate orbitals with noncontinuous indices.
[2023-Mar-24] For generating NBO .47 file, d type of spherical-harmonic type of basis functions are allowed to be present in the inputted wavefunction.
[2023-Mar-20] The function of plotting (local) integral curve and plane-averaged curve (Section 3.16.14 of manual) is extended. When plotting a curve, position and value of minima and maxima of the curve are automatically reported on screen. In addition option 11 is added, by which user can evaluate curve value at a given X position.
[2023-Feb-22] For flexibility consideration, main real space functions now can also be invoked as user-defined function. If you set "iuserfunc" in settings.ini to 10000+i, then the ith real space function will be chosen as the user-defined function.
[2023-Feb-15] Fermi level now can be rigorously determined according to inputted temperature based on Fermi-Dirac distribution, see Section 3.300.9 of Multiwfn manual for detail.
[2023-Feb-11] (IMPORTANT) Calculation speed of grid data for periodic systems is improved markedly! In main function 0, the speed of visualizing orbital wavefunction of periodic systems is also improved significantly (at least one order of magnitude for large systems).
[2023-Jan-28] Subfunction 97 of main function 1000 (see Section 4.A.8 of Multiwfn manual) now can generate natural orbitals based on post-HF density matrix with ROHF reference (previously only RHF and UHF references are supported)
[2023-Jan-28] "Loading bonding connectivity from mol/mol2 file" has been added to "Other settings" in menu bar of GUI window. When you find the automatically determined bonding relationship is not well satisfied, you can use this option to load connectivity from a provided .mol or .mol2 file.
[2022-Dec-18] Parallel efficiency for calculating grid data has been significantly improved on computer with dozens of CPU cores. Thanks to Igor S. Gerasimov for providing hint.
[2022-Dec-1] Spectrum plotting module (main function 11) now is able to plot NMR and UV-Vis spectra based on output file of BDF program. Electron excitation analysis module (main function 18) now supports BDF output file. Thanks Cong Wang for contributing relevant code.
[2022-Nov-27] Option -1 has been added to subfunction 5 of main function 18. By this option, you can request Multiwfn to skip calculation of transition dipole moments between excited states while only calculate them between ground state and excited states, and hence saving quite a lot of time when the system is large.
[2022-Oct-15] MOPAC input file (.mop) now can be used as input file for providing atom information.
[2022-Aug-12] Subfunction 2 of main function 100 now can export GROMACS .gro file if present system is periodic.
[2022-Jul-28] Windows version of Multiwfn now can invoke significantly larger memory than before, thus avoiding crash when deal with huge system.
[2022-Jul-16] IRIscatter.gnu has been provided in "examples\scripts" folder, by which you can plot colored scatter map between IRI and sign(λ2)ρ via gnuplot. See Section 4.20.4 of manual for example of use.
[2022-Jul-15] Some improvements on fuzzy analysis module: (1) For integrating a real space function via option 1, atomic grid has been replaced with molecular grid, this improves integration accuracy significantly for some functions (e.g. Laplacian of electron density) when Hirshfeld or Hirshfeld-I partition is used. (2) Option -6 is added to the interface, which enables using considerably more accurate but more expensive molecular grid instead of the default atomic grid for evaluating atomic overlap matrix (AOM) (3) Accuracy of AOM is notably enhanced when diffuse functions are heavily employed when Hirshfeld(/-I) partition is used. (4) When "ispecial" in settings.ini is set to 3, then all MOs will be taken into account in AOM calculation even if current wavefunction is single-determinant.
[2022-Jul-4] Minima of van der Waals potential now can be accurately located by topology analysis module, see Section 4.2.10 of manual for example.
[2022-Jun-22] Analytic gradient and Hessian of norm of electron density gradient, reduced density gradient (RDG), interaction region indicator (IRI), and information entropy density are available in Multiwfn now. Therefore, their topology analysis becomes faster and more accurate than before.
[2022-Jun-19] Steepest ascent and steepest descent methods have been supported by topology analysis module to only locate maxima and minima, examples of using this method to locate maxima of ELF and IRI/RDG are added to Section 4.2.2 and Section 4.2.11 of manual, respectively.
[2022-Jun-19] (IMPORTANT) Searching critical points of electrostatic potential by topology analysis module (main function 2) becomes significantly faster and more robust, relevant examples have been added as Section 4.2.9 in manual.
[2022-Jun-13] Cost of generating density matrix for multiconfigurational wavefunction of large systems is significantly reduced.
[2022-May-24] Better compatible with wavefunctions in which some ghost atoms do not have any basis function.
[2022-May-18] For plotting IR spectrum generated by xtb program, now users should use the "vibspectrum" file outputted by "--ohess" task as input file of Multiwfn. xtb older than 6.5 is no longer formally supported.
[2022-May-16] Source code of Multiwfn have been compatible with gfortran and can link other blas/lapack libraries instead of MKL.
[2022-Apr-21] Spin-flip TDDFT of ORCA is supported by electron excitation analyses (main function 18). Currently only a few functions, including generating natural orbitals of excited state, hole-electron analysis and related analyses, are formally supported, other functions were not tested. See introduction of input file in Section 3.21.A of manual for details.
[2022-Apr-20] User-defined functions 1101 and 1102 have been added, they correspond to DFT exchange-correlation potential of alpha and beta spins for open-shell system, respectively (exchange-correlation potential in older version only supports closed-shell case via user-defined function 1100).
[2022-Apr-8] Color of interbasin surfaces generated by topology analysis module now can be set by "interbasin_RGB" in settings.ini.
[2022-Mar-28] More options are added to "Set camera" droplist in menu bar of 3D GUI to flexibly control viewpoint, such as rotation angle along screen.
[2022-Mar-22] Improvements of domain analysis module: (1) Option 12 is added to post-processing menu, it can export X,Y,Z and grid data value of all grids in a selected domain to a plain text file. (2) When use option 1 or 2 to integrate domain(s), now one can select to directly use the grid data recorded in memory as the integrand. (3) Periodicity can be taken into account (determined by option "4 Toggle considering periodicity during domain analysis" in domain analysis interface). (4) Option 4 is added to post-processing menu, which can sort domain indices according to volume of domains, so that important domains (often largest ones) can be more easily studied.
[2022-Mar-15] (IMPORTANT) After performing interfragment charge transfer (IFCT) analysis, CT(%) and LE(%) are directly shown on screen, this is quite convenient for determining type of electron excitation.
[2022-Mar-1] Calculation cost of option "Calculate hole-electron Coulomb attractive energy" in post-process menu of hole-electron analysis has been largely reduced.
[2022-Feb-25] Calculation speed of real space functions is markedly improved if general contracted basis set is used (e.g. ANO series, MOLOPT series of CP2K).
[2022-Feb-25] At the end of the .wfn file exported by Multiwfn, $MOSPIN field is outputted to explicitly indicate spins of recorded orbitals. This design is the same as Molden2aim code.
[2022-Feb-17] "Toggle between perspective and orthographic views" option has been added to "Set perspective" drop-down list in menu of GUI of showing 3D objects.
[2022-Feb-11] The quality of fingerprint plot has been significantly improved! See updated Section 4.12.6 of Multiwfn manual.
[2022-Feb-7] A new option "Perform integration for subregion of some domains according to range of sign(lambda)*rho" has been added to post-processing menu of domain analysis module (subfunction 14 of main function 200), see updated Section 3.200.14 of manual for detail. It may be useful in studying interactions by integrating specific real space function in the regions of interest.
[2022-Jan-16] When setting frequency scale factor (via option 14 in main function 11), now user can input lower and upper limits of frequencies, only the frequencies within the range will be scaled by the inputted scale factor.
[2022-Jan-2] .sdf molecular structure file format has been supported.
[2021-Dec-27] Multiple frame .mwfn file has been supported.
[2021-Dec-20] In the interface of plotting transition density matrix, new options 10 and 11 are available for changing label size and number of decimal places of Z-axis labels; in addition, option 7 has been extended, now it can also set stepsize between labels of Z-axis.
[2021-Dec-15] To screen uninterested IRI isosurfaces in extremely low electron density regions, "IRI_rhocut" parameter is added to settings.ini and has default value of 5E-5 a.u. IRI is set to an arbitrarily large value (5) in the regions where electron density is equal or smaller than this parameter so that IRI isosurfaces will not appear at commonly adopted isovalue. This treatment is automatically disabled during topology and basin analyses to avoid causing artificial extrema.
[2021-Dec-7] Calculation of PEOE and EEM charges has supported considering periodic boundary condition.
[2021-Dec-4] In the atmdg.pdb file exported by option 6 in the post-process menu of IGM and IGMH analysis modules, the "Occupancy" field now records percentage atom δg indices, which exhibits percentage controbution of various atoms to interfragment interaction. In VMD, you can color atoms according to this property to vividly exhibit importance of each atom, see updated IGM example in Section 4.20.10 of Multiwfn manual.
[2021-Nov-21] After performing IGM or IGMH analysis, integrals of δg, δginter and δgintra over the whole space are outputted on screen. The integral of δginter is particularly useful in quantitatively analyzing interfragment interaction strength.
[2021-Nov-8] (IMPORTANT) The formula used in IGM and IGMH analyses has been improved to make the result more reasonable (the definition of the IGM type of gradient norm has slightly changed), all data related to IGM and IGMH analyses are affected and somewhat different to previous version. In previous version the δg distribution somewhat violates structure symmetry, this problem is resolved by this update. This update also makes isosurfaces in IGMH map notably smoother.
[2021-Nov-8] When outputting atom δg indices and atom pair δg indices to atmdg.txt in IGM or IGMH analysis module, percentage contributions are also outputted together, this is useful to examine relative importance of various atoms and atom pairs for the studied interfragment interaction.
[2021-Nov-3] Analytic gradient for Shannon entropy density, Fisher information density and second Fisher information density (user-defined functions 50, 51, 52, respectively), as well as analytic Hessian for Shannon entropy density and Fisher information density, have been implemented. So their topology analysis becomes more accurate and efficient than before (older version only supports topology analysis based on numerical gradient and Hessian for them).
[2021-Oct-22 & 2021-Nov-17] The option -5, which is used to export basins generated by basin analysis module, has been significantly extended. Via this option, now it is able to easily plot nice ELF isosurface map colored by basin types (monosynaptic, disynaptic and others) via VMD software. In addition, this option now allows to export grid data of function value in the region of specific basins as cube file, so that you can then visualize isosurface via e.g. VMD only for the selected basins. See the newly added example in Section 4.17.10 of manual.
[2021-Oct-20] Main function 25 is added, it is a collection of all methods for measuring electron delocalization and aromaticity supported by Multiwfn.
[2021-Oct-18] In main function 0, a new option "Toggle showing all boundary atoms" has been added to "Other settings" in menu bar. If a file containing cell information is used as input file, this option is able to show all atoms at boundary of the cell, so that crystal structure can be visualized more clearly.
[2021-Oct-10] More options have been added to GUI of main function 5, in which you can save current plotting settings to isosur.ini and load the settings from it next time.
[2021-Oct-10] When loading .gro/pdb/pqr file, residue names and indices will also be loaded, and when saving present system to .pdb/pqr file, these information will be kept.
[2021-Sep-27] Functions related to (hyper)polarizability analysis have been collectively moved to a new main function 24.
[2021-Sep-27] VASP POSCAR file now can be created by option 27 of subfunction 2 of main function 100.
[2021-Sep-27] Subfunction 30 has been added to main function 6. This is particularly useful in obtaining EDDB grid data based on EDDB code of D. W. Szczepanik. After loading the .fchk file exported by EDDB code, entering this function, and selecting option 1 (exchange orbital energies in eV with occupation numbers), then occupation numbers will correspond to eigenvalues of Natural Orbital for Bond Delocalization (NOBD). Then if you use main function 5 to calculate grid data of electron density as usual, the resulting grid data will directly correspond to EDDB.
[2021-Sep-20] In DOS plotting module, the lines representing energy levels now can be shown at bottom of the curves, making the line+curve graph evidently clearer. The examples in Section 4.10 of manual has been updated to exhibit this improvement. In addition, the lines of TDOS corresponding to unoccupied MOs are shown by gray to distinguish them with the occupied MOs.
[2021-Sep-13] The function "Viewing free regions and calculating free volume in a box" (subfunction 1 of mainfunction 300) now fully supports non-orthogonal box/crystal, and two additional switching functions have been supported for smoothing grid data (note that the default one is different to the previous version). Correspondingly, Sections 3.300.1 and 4.300.1 of manual have been updated.
[2021-Sep-11] When exporting .47 file using subfunction 2 of main function 100, Fock matrix will also be exported now.
[2021-Sep-9] (IMPORTANT) Energies of biorthogonalized orbitals and localized orbitals now can be directly evaluated based on the Fock matrix generated by energies and coefficients of MOs, see updated example in Section 4.100.12 and Section 4.19.1, respectively. That means you no longer need to prepare a file containing Fock matrix (such as .47 file) when evaluating the energies of the orbitals, and thus it is much more convenient than before.
[2021-Sep-8] In fuzzy analysis module and basin analysis module, after choosing corresponding option to ask Multiwfn to output basin/atomic multipole moments, atomic or basin electronic spatial extent <r^2> will be outputted together, which is a useful metric of spatial extent of electron distribution within basins or atoms.
[2021-Sep-6] Functionality of subfunction 11 of main function 200 is slightly improved.
[2021-Sep-3] Via main function 11, UV-Vis and ECD spectra now can be plotted based on EOM-CCSD and (DLPNO-)STEOM-CCSD output file of ORCA.
[2021-Aug-25] The interface of option 25 of main function 6 (modifying orbital coefficients), has been improved. Now one can choose GTFs or basis functions more easily and flexibly.
[2021-Aug-23] The equation of ghost-hunter index employed by previous version is found to be erratic (the equation in its original paper is wrong, the virtual MO energy εa should be -εa,) and thus the result is not physically sound, this problem has been fixed in the code. The Section 3.21.7, which describes ghost-hunter index, has been largely rewritten
[2021-Aug-23] ORCA input and output files now can be used as input file to provide atom information for Multiwfn.
[2021-Aug-22] The "iloadGaugeom" parameter in settings.ini has been set to 1 by default.
[2021-Jul-15] In conceptual DFT analysis module (main function 22), after choosing option -1 and then input 2 to change to ORCA, then if you choose option 1 to generate ORCA input files of various electron states, Multiwfn will directly ask you if invoking ORCA to run them to yield .wfn files and meantime automatically delete other files. To make this feature take effect, you should set "orcapath" in setting.ini to actual path of ORCA executable file.
[2021-Jul-14] A new option "5 Use built-in contour values suitable for special purpose" has been added to contour line setting interface in post-process menu of main function 4. Via this option, you can directly adapt built-in contour values recommended for plotting specific functions (orbital wavefunction, density difference, ELF/LOL).
[2021-Jul-7] In the text box at bottom right side of main function 0, or in the interface of orbital composition analysis, or after choosing the real space function "4 Value of orbital wavefunction", now you can input orbital label to choose MO. For example, "h" stands for HOMO, "l+2" stands for LUMO+2, "la" stands of LUMO of alpha, "hb-3" stands for HOMO-3 of beta, etc. This feature is available for R/U/RO(HF/KS) wavefunctions.
[2021-Jul-5] In the function "Visualize (hyper)polarizability via unit sphere and vector representations" (subfunction 3 of main function 300), alpha_vec.tcl and gamma_vec.tcl now can be generated when choosing option 1 and option 3, respectively. If they are run in VMD, anisotropy of polarizability and second hyperpolarizability can be clearly visualized according to length of arrows in X, Y and Z directions. See Section 3.300.3 for detail and updated Section 4.300.3 for example.
[2021-Jul-5] Option 29 has been added to main function 26, it is used to exchange information between two orbitals, you can use this feature to reorder orbitals.
[2021-Jul-4] Conceptual density functional theory analysis module (subfunction 16 of main function 100) has been moved to new main function 22 due to its high importance.
[2021-Jul-2&10] Spectrum plotting module (main function 11) now is fully compatible with ORCA 5.0. The function for generating ORCA input file (you can enter it by inputting "oi" in main menu) now is compatible with ORCA 5.0; at the meantime, r2SCAN-3c and wB97X-2-D3(BJ) are added as new options.
[2021-Jun-30] (IMPORTANT) A new parameter "ESPrhoiso" has been added to settings.ini. When calculating ESP grid data by Multiwfn's own code, ESP will be evaluated only for the grids around isosurface of electron density of this value for significantly saving computational time. This parameter can also be directly specified via argument, this is why you can find that in the ESPiso.bat and ESPiso.sh scripts in "examples\drawESP\" folder, "-ESPrhoiso 0.001" has been added to the running command. This update makes plotting ESP colored vdW surface map by Multiwfn in combination with VMD (as introduced in Section 4.A.13 of manual) faster than previous version by one order of magnitude!
[2021-Jun-24] (IMPORTANT) Mixed type of grid (uniform + atomic center grid) now has been supported to calculate basin overlap matrix (BOM) of AIM basins in basin analysis module, the quality of the resulting BOM is significantly better than previous version especially for core orbitals. Specifically, in main function 17, if the real space function used to generate the basins is electron density, after entering option 4 to evaluate LI/DI, or after entering option 5 (or 6) to output BOM (or atomic overlap matrix), Multiwfn will ask you to choose type of integration grid for evaluating BOM.
[2021-Jun-23] (IMPORTANT) In topology analysis module, if the function to be analyzed is electron density and bond paths have been generated, after choosing option 0 to view summary of found critical points, now you can directly see the two atoms connecting to each BCP from console window.
[2021-Jun-19] In the GUI of topology analysis module, a new option has been added to menu: "CP labelling settings" - "Labelling only one CP". After choosing it and input a CP index, e.g. 19, then only label of CP 19 could be shown when "CP labels" check box has been selected. This improvement makes finding a specific CP from topology map much easier for large systems.
[2021-Jun-18] CHGCAR, CHG, ELFCAR, and LOCPOT files generated by VASP now can be used as input. They provide atomic information, cell information and grid data for Multiwfn. Evidently, Multiwfn can also be used as a converter to convert them to cube file (using option 0 of main function 13 to export .cub).
[2021-May-28] Option 37 has been added to main function 6, it can transform restricted wavefunction (R/RO) to equivalent unrestricted wavefunction, in other words, splitting the single set of orbitals of restricted wavefunction to alpha and beta orbitals.
[2021-May-28] The CDA module now supports using SCPA method instead of Mulliken method to calculate composition of complex orbitals, just changing the "iCDAcomp" in settings.ini to 2.
[2021-May-11] Via subfunction 2 of main function 100, now Multiwfn is able to Gaussian input file in internal coordinate (only Cartesian coordinate is supported before).
[2021-Apr-30] When visualizing/exporting electric/magnetic transidion dipole moment density in hole-electron analysis module, now one can choose to export norm of the vector, namely choosing "4: Norm, sqrt(x^2+y^2+z^2)".
[2021-Apr-29] (IMPORTANT) In suboption 10 of option -1 in topology analysis module, now user is able to ask Multiwfn to only search for CPs between two specific fragments. This is particularly useful for searching intermolecular CPs (the cost may be significantly lower than searching CPs for the whole complex). See part 4 of Section 4.2.6 of manual for practical example.
[2021-Apr-24] For convenience, the 1.2*CM5 charge, which is well-suited for OPLS-AA forcefield, now can be directly obtained by option -16 of main function 7.
[2021-Mar-30] In the option "3 Show atom or fragment contribution to hole and electron and plot the contributions as heat map" of hole-electron analysis, now user can directly choose to use Hirshfeld partition to compute hole and electron composition.
[2021-Mar-29] POSCAR file of VASP now can be used as input file.
[2021-Mar-29] IFCT analysis has supported Hirshfeld partition for hole and electron to derive IFCT terms, the procedure is much easier than using the Becke partition in previous version. See updated Section 4.18.8.1.
[2021-Mar-16] .cif file now can be exported by subfunction 2 of main function 100 if cell information has been loaded from input file.
[2021-Mar-16] Sphericity index now is automatically printed during quantitative molecular surface analysis. It is a good metric of sphericity of the surface. See end of Section 3.15.1 of manual for detail.
[2021-Mar-7] Output file of frequency analysis task of CP2K program now can be used as input file for plotting IR spectrum in main function 11.
[2021-Feb-21] Operations on perspective in GUI window become much faster for large systems.
[2021-Feb-20] δginter defined in the independent gradient model based on Hirshfeld (IGMH) has been added as 91th user-defined function, therefore you can easily obtain its value at critical points, plotting it as curve or plane map, etc. Before using it, you should enter option 16 of main function 1000 (a hidden function) to define two fragments.
[2021-Feb-14] (IMPORTANT) .cif file now can be loaded to provide atom information and cell information.
[2021-Feb-10] Quantum ESPRESSO input file now can be created via option 26 of subfunction 2 of main function 100.
[2021-Feb-4] CP2K input file now can be loaded to provide atom information and cell information.
[2021-Feb-3] Suboption 4 has been added to option -4 of basin analysis module (main function 17). This new option is used to export all atoms and attractors to a .gjf file, which can be loaded into GaussView, this feature makes visualization of attractors very convenient. See end of Section 4.17.2 for detail.
[2021-Jan-31] The functions for processing grid data (main function 13) have been fully compatible with non-orthogonal grid.
[2021-Jan-29] Energy decomposition analysis based on molecular forcefield (EDA-FF) now can be employed to arbitrarily large systems since the excessive memory consuming for storing huge matrices has been fully avoided.
[2021-Jan-28] A fully automatic shell script for calculating 1.2*CM5 charges based on Gaussian and Multiwfn is provided and described in Section 4.7.9. 1.2*CM5 is a charge model well compatible with OPLS-AA forcefield, see J. Phys. Chem. B, 121, 3864 (2017).
[2021-Jan-16] Barzilai-Borwein steep descent algorithm has been supported in topology analysis module, it is a robust algorithm dedicated to search minima for any real space function. It can be activated using suboption 12 of option -1 in topology analysis module.
[2021-Jan-15] Center positions of positive charges (nuclear charges) and negative charges (electronic charges) are printed by subfunction 5 of main function 300.
[2021-Jan-14] (IMPORTANT) d-band center now can be calculated via DOS plotting module, it is a very popular quantity in studying chemisorption of molecule on transition metal surface. See Section 4.10.6 for example on how to calculate it.
[2021-Jan-10] Text size of ticks, axis name and legend in DOS plotting module now can be set by option 21 of post-process menu.
[2021-Jan-10] "ibasinlocmin" parameter has been added to settings.ini. During generation of basins in main function 17, when grid data is found to be non-negative everywhere, minima (repulsors) will be located instead of maxima (attractors)
[2021-Jan-1] Calculation speed of orbital-weighted Fukui function and dual descriptor has been significantly improved.
[2020-Dec-25] The subfunction 11 of main function 18 now is able to decompose transition electric dipole moment between two excited states into contributions from various basis functions and atoms, see Section 3.21.11 of manual.
[2020-Dec-23] In the spectrum plotting module, the option "17 Other plotting settings" has been significantly extended, in which one can set number of decimal places in axes, set type of labels (float, exponent, scientific), set text size of axis name / ticks / legends, and set position of legends.
[2020-Dec-22] IRI (Interaction region indicator) analysis has adopted a new form of IRI function, whose graphical effect is better. The corresponding VMD plotting script is also updated. Hence the result is marginally different to version 3.7.
[2020-Dec-11] In option 15 of main function 11 (plotting spectrum), one can input 0 and then input a X position, then 10 transitions having largest contribution to this position will be shown, This is quite convenient to make clear major contributors at specific spectrum positions (e.g. peak positions of important absorptions). See updated Section 4.11.2 for example.
[2020-Dec-8] A few potentials of kinetic energy funtionals have been supported as user-defined function 1210, see Section 2.7 for detail.
[2020-Dec-2] Contour line map now can be filled by colors between the lines, one can obtain very pretty map using this new drawing style. User should normally draw contour line map via main function 4, then select option 9 in the post-processing menu. See updated Section 4.4.9 of manual for illustration.
[2020-Nov-6] AdNDP module, subfunction 16 of main function 200, and subfunction 13 of main function 18, now export the newly generated orbitals in .mwfn format instead of .molden format, since .mwfn format has evident advantages.
[2020-Oct-14] In the orbital localization module and biorthogonalization module, if orbital energy is needed to calculate, in the step of loading Fock matrix, now one can ask Multiwfn to directly load it from ORCA output file. The keyword "%output Print[P_Iter_F] 1 end" must be specified in the ORCA input file to request ORCA to print Fock matrix at each SCF iteration.
[2020-Oct-14] In the conceptual density functional theory module (subfunction 16 of main function 100), after selecting option 2 or 3, if N/N-1/N+1.wfn cannot be found in current folder, user will be asked to input path of wfn/wfx/fch/mwfn file of corresponding state (older version can only use .wfn file in current folder).
[2020-Sep-17&20] Algorithm of LOLIPOP module becomes more reasonable, the result is thus slightly different to older versions. In addition, option 6 is added to this module to export the actually considered points to pt.xyz file so that user can then use VMD to visualize distribution of the points. Option 5 is also added, by which user can select which side of the ring will be considered in the LOLIPOP calculation. New LOLIPOP example has been added to Section 4.100.14 of manual to illustrate the new features.
[2020-Sep-14] Calculation speed of IGMH analysis has been significantly improved when .fch/.molden/.gms file is used as input file.
[2020-Sep-12] Even after using some analysis functions involving real space functions (e.g. main functions 2, 4, 5, 7, 9, 12, 17...), all virtual orbitals will still be retained when you use input file containing basis function information. (In old versions, virtual MOs higher than LUMO+10 are automatically removed after using these functions)
[2020-Sep-11] (IMPORTANT) Multicenter bond order (MCBO, also known as multicenter bond index) calculation function has been significantly improved!!!!! Due to implementation of the new algorithm developed by Tian Lu, the cost for large rings has been reduced by several orders of magnitude, and the cost now grows only linearly with the number of ring members, hence one can very quickly calculate MCBO for a ring consisting of even dozens of atoms! In addition, the upper limit of ring members has been removed.
[2020-Aug-21] "gbw2chk.sh" script has been added to "examples\scripts folder", it is used to convert all ORCA .gbw files to .chk file of Gaussian with same name, so that Gaussian can use converged wavefunction of ORCA as initial guess. The ORCA, Multiwfn and Gaussian must have been installed on local machine. The "chk2gbw.sh" works similarly but for .chk->.gbw conversion.
[2024-Nov-11] The extremely efficient implementation of multi-center bond order (MCBO) proposed by Tian Lu and employed in Multiwfn since version 3.7 has been explicitly documented at the end of Section 3.11.2. Note that this is the first and the key algorithm making MCBO can be used for a ring containing arbitrary number of atoms.
[2024-Jul-27] Section 4.200.14.3 has been added to manual to show how to integrate electron density difference in its isosurfaces using domain analysis module.
[2023-Aug-11] All sections related to delocalization and aromaticity analyses have been collected as Sections 3.28 (introduction) and 4.25 (examples).
[2023-Aug-10] All sections related to (hyper)polarizability analysis have been collected as Sections 3.27 (introduction) and 4.24 (examples).
[2021-Aug-9] A new Section 4.2.8 is added to illustrate how to perform topology analysis for density difference. The deformation density of H2O is taken as the example.
[2021-Jul-14] A new Section 4.4.11 is added to illustrate how to plot a very clear and pretty color-filled contour line map for exhibiting 4pz atomic orbital of Kr atom.
[2021-May-28] A new Section 4.16.4 is added. This section illustrates how to correctly perform CDA analysis based on ROKS wavefunction for open-shell system to avoid explicitly distinguish alpha and beta spins during discussing CDA result and analyzing orbital interaction diagram.
[2021-May-20] Example of plotting fluorescene spectrum using main function 11 is given in Section 4.11.11. The process of plotting phosphorus spectrum is also mentioned.
[2020-Nov-30] Section 4.17.9 has been added to manual to illustrate how to correctly calculate atomic energy (contribution of atomic basin to total electronic energy).
文/Sobereva@北京科音 2026-Jan-11
之前我天天在网上答疑时看过太多初学者做分子动力学模拟时本该用NPT系综的时候却误用或乱用NVT系综,导致自取其辱,或者白浪费很多时间。甚至今日在同一天内,还看到计算化学公社论坛里两个新帖http://bbs.keinsci.com/thread-57828-1-1.html和http://bbs.keinsci.com/thread-57823-1-1.html都是乱用NVT而导致了迷惑的结果,我遂感到很有必要专门写个小文批判乱用NVT的行为、澄清什么时候才真正适合用NVT。实际上本文内容就是北京科音分子动力学与GROMACS培训班(http://www.keinsci.com/KGMX)里讲“分子动力学的基本原理与算法”中的一部分,并稍作扩展而已,但凡参加过此培训完整系统性学习过分子动力学的学员都不会在这种常识性问题上犯错误,压浴的算法在培训里也有非常全面细致的介绍。
首先明确一点:做常见体系的动力学模拟,应当默认用NPT系综,即压浴(barostat)和热浴(thermostat)同时使用,或者说同时考虑控压(压力耦合)和控温(温度耦合)。这显而易见,毕竟大多数情况模拟的体系在现实中都是在恒定温度和压力条件下的,比如烧杯中的溶液、细胞中的蛋白质。若关掉控压,即不设置压浴,就是NVT系综了。
先说几个常识。体系盒子尺寸的改变会令压力改变,盒子越大内压越小,盒子越小内压越大。控压有不同算法,共同原理都是在动力学过程中不断调节盒子尺寸并同时按比例缩放原子坐标,以使得当前体系压力的平均值与自设的参考压力相符,但允许在模拟过程中有一定程度的波动。每次控压时要求三个方向的盒子尺寸按相同比例变化称为各向同性控压,XY和Z方向独立控压称为半各向同性控压,三个方向都独立控压称为各向异性控压。压浴的效果严重依赖于人为指定的可压缩系数,它体现温度不变的情况下增加单位压力令体积的相对减小量。各向异性控压时可以在盒子不同方向上分别设这个参数,如果在某个方向上可压缩系数设为0,则这个方向上即便开启了控压盒子尺寸也不会改变。本文说的控压默认是指设的可压缩系数>0的情况。
有的情况用压浴是绝对必须的,例如:
• 用packmol(用法介绍见//www.umsyar.com/473)、GROMACS自带的insert-molecules等程序构建的体系初始模型对应的盒子往往明显偏大,因而对应的体系初始密度往往明显偏小。如果你在模拟时不考虑控压,显然在分子之间由于相互作用聚集到一起后盒子里就会出现真空区。只有用控压时才可能通过自发调节盒子尺寸令体系密度与实际一致而消掉真空区。前面提到的http://bbs.keinsci.com/thread-57828-1-1.html和http://bbs.keinsci.com/thread-57823-1-1.html这两个帖子里的截图一看就知道都是该用NPT却误用了NVT导致盒子里出现了明显真空区。顺带一提,用VMD观看周期性体系的时候强烈建议用pbc box命令把盒子显示出来,免得被蒙在鼓里,而这俩帖子都没显示出盒子。
• 研究相变过程。相变会伴随着密度的变化,比如水变成冰体积会自发显著膨胀。显然如果你模拟水结冰,而让盒子尺寸始终不变的话,结冰过程都无法如实模拟。
• 研究变温过程。比如你对一个材料热膨胀系数为正的温度区间内研究升温过程,考虑控压的话能如实描述热膨胀效应,若不允许控压则相当于内压越来越大,跟高压锅似的。
• 有的研究专门模拟很高压力下的情况,显然也必须用控压了,除非你能根据已有的拟合关系事先知道这个压力下的盒子尺寸理应是多大,并将之作为初始盒子尺寸。
虽然用了压浴后会增加耗时,但比NVT耗时增加程度甚微,因此若没有什么不能用控压的明确理由时都应当开着压浴。不适合用控压的情况比较有限,应当用NVT的常见情况有以下这些:
• 需要维持特定真空区的体系,典型的是气液界面。在垂直于界面方向上若用控压会导致在此方向上盒子不断收缩、真空区逐渐消失,经过足够长时间的模拟后体系就变成了纯液体盒子了。气液界面体系在平行于界面的方向上也不应该用控压,否则由于表面张力原因界面会越来越小。显然模拟气液界面要用NVT。如果要模拟液液界面,虽然平行于界面方向上不应该控压(或者设可压缩系数为0也行),但垂直于界面方向上应该控压,从而令液体密度能自发调节到合理。
• 周期边界条件下算孤立体系。目前版本的GROMACS已经不支持非周期边界条件了,因此模拟单分子或者分子团簇时,只能用一个足够大的盒子当三维周期性做NVT模拟,并且为了避免体系与其相邻镜像存在相互作用而需要令盒子足够大。此情况若用控压显然也会令盒子逐渐缩小,导致体系与其镜像最后虚假地作用上了。
• 想精确维持特定的密度。例如使用已知的实验密度进行模拟、考察特定性质随密度的变化(跑很多次模拟,每次设置不同的盒子体积),显然需要NVT。
• 模拟一些特殊体系。比如超临界气体的可压缩系数很大,用控压时盒子尺寸往往会剧烈变化,甚至导致崩溃,因而通常基于其实验已知密度来定义特定尺寸的盒子进行NVT模拟。
• 计算某些性质的时候原理上用NVT比NPT更合适,对于这种情况可以先做NPT模拟使得盒子尺寸达到平衡,然后再切换到NVT续跑。例如计算MSD曲线并得到扩散系数,用控压的话由于在模拟过程中会不断对原子坐标进行缩放,多多少少会对结果带来不利影响(不过对于液体体系模拟来说,盒子尺寸通常波动很小,因此也不能说NPT下算的结果就不能用)。再比用周期扰动法计算粘度,原理上就应当在NVT下进行,此方法的原文里也是这么做。
• 用控压时发现模拟崩溃,并怀疑是控压所致,此时可以暂时尝试不用控压看看动力学情况。这点我之前在//www.umsyar.com/soft/Sobtop#FAQ8里介绍怎么排查动力学崩溃原因的时候也说过。如果改用NVT跑了一阵子都没问题,可以尝试再把控压打开续跑,看看NPT能否顺利跑下去;如果能的话,说明之前做NVT的时候令体系得到了足够的弛豫、状态被稳定化了。如果一上来就用NPT模拟虽然没崩溃,但是盒子变化异常,比如尺寸波动剧烈,也可以先跑一段时间NVT试图稳定化一下。
• 在GROMACS里利用freeze冻结原子时,同时开启压浴容易造成崩溃,因此要用NVT,或者用NPT结合位置限制势实现类似目的。
还值得一提的是做盒子以特定方式变化的模拟的情况。GROMACS里可以在mdp里用deform设置要求盒子的特定分量按照特定速度发生变化,比如你设了Z方向尺寸的变化速度,那么Z方向就不能用控压来自发调节盒子。
网上有一些教程,以及有不少文章,做NPT之前都先做NVT,我强烈不建议盲目效仿!!!这事我在网上答疑时已经说过无数次。NPT之前做NVT有>99%的可能都是多此一举的,白浪费你的时间。虽然如前所述,NPT之前做NVT有可能能令体系先稳一稳避免直接NPT模拟时异常或崩溃,但实际中必须先做NVT的情况甚少。只要你的拓扑文件合理、体系初始结构别太恶心(比如存在严重不合理接触、初始压力特别离谱)、模拟设置没有什么硬伤、跑动力学之前已做了充分的能量极小化,并且你最终就是要在NPT下模拟,那么上来直接用NPT模拟就行了。倘若万一真的发现异常,可以到时候再考虑做NVT预平衡一下。即曰此时NVT是补救时才需要用的,而不要当做默认要做的过程!
之前在我的思想家公社QQ群里谈论以上问题时,有人提到Molecules, 25, 5120 (2020)一文以试图论证NPT之前做NVT的意义。这篇文章的意思是对此文研究的糖脂这类体系,当初始结构的压力明显不合理的时候,平衡相一开始先用NVT再NPT能避免直接用NPT时由于模拟初期盒子显著震荡、相应地缩放原子位置导致水被巧合地弄进疏水区。但实际上此发现明显不足以构成预平衡先要用NVT的“普遍的必要性”,这只是属于小众体系的罕见情况。只能说对于没有人工监控的靠脚本实现的批量模拟,并且你也不在乎NVT多跑几百ps花的计算量,倒是可以加入先做NVT的过程以求绝对保险。顺带一提,也有很多动力学研究的本身就是非平衡过程,比如两相间的互溶,这种情况就不可能先加入NVT预平衡过程了。
本文最后留下一句话进行强调:若无明确、说得通的理由,不要用NVT!!!
]]>文/Sobereva@北京科音 2025-Dec-9
mIGM是笔者在Struct. Bond., 190, 297 (2026) DOI: 10.1007/430_2025_95中提出的能够非常快速、直观地展现自定义片段间相互作用的方法,实用性极强,在《使用mIGM方法基于几何结构快速图形化展现弱相互作用》(//www.umsyar.com/755)中做了专门介绍并演示了怎么通过Multiwfn程序实现,如果没看过此文的话一定要先看看。在同一篇论文里,基于mIGM方法笔者还进一步提出了amIGM方法,全称为averaged mIGM,此方法可以展现动态环境中的片段间的平均弱相互作用。amIGM方法远远比我以前在《使用Multiwfn研究分子动力学中的弱相互作用》(//www.umsyar.com/186)中介绍的与它用处类似的aNCI方法好用,因此aNCI方法完全可以弃了!
下面第1节将介绍amIGM并与其它方法对比,第2节介绍一些计算要点,第3节将会示例如何通过Multiwfn程序做amIGM分析重现amIGM原文中的图。读者请务必使用2025-Dec-8及以后更新的Multiwfn版本。如果你对Multiwfn不了解,强烈建议看《Multiwfn FAQ》(//www.umsyar.com/452)和《Multiwfn入门tips》(//www.umsyar.com/167)。
使用Multiwfn做amIGM分析发表文章时应同时引用上面提到的amIGM原文以及Multiwfn启动后提示的程序原文,也推荐一起引用我发表的包含amIGM在内的相互作用可视化分析方法综述Angew. Chem. Int. Ed., 137, e202504895 (2025),此文的介绍见//www.umsyar.com/746。
这里假定读者已经了解mIGM方法,也看过了《一篇最全面介绍各种弱相互作用可视化分析方法的文章已发表!》(//www.umsyar.com/667)和《Angew. Chem.上发表了全面介绍各种共价和非共价相互作用可视化分析方法的综述》(//www.umsyar.com/746)这两篇综述以及《使用Multiwfn做IGMH分析非常清晰直观地展现化学体系中的相互作用》(//www.umsyar.com/621)了解了sign(λ2)ρ着色的δg_inter等值面是怎么一回事。mIGM、IGMH、IRI、NCI等方法都是对于单一几何结构做的分析,然而现实中分子是在不断运动的,因此分子间相互作用也是随时间变化的,有很多情况光是用一帧或几帧结构进行分析是明显无法全面描述动态环境中出现的相互作用的情况的。amIGM方法将mIGM扩展到了动态环境中的弱相互作用的分析上,对分子动力学模拟得到的几百甚至几千帧结构进行计算,其等值面能够展现模拟过程中存在的分子间的平均的相互作用,具体实现细节可以看前述Struct. Bond.原文中的第4节。
amIGM与mIGM间的关系高度类似于aNCI(也叫aRDG)和NCI间的关系,amIGM相较于aNCI有以下关键性优点:
(1)amIGM可以自定义片段、只展现特定片段间的相互作用。而aNCI会同时把所有弱相互作用都展示出来,经常导致图像非常混乱。虽然可以靠Multiwfn的格点数据屏蔽功能做后处理来一定程度上屏蔽掉不想要的aNCI等值面,但不仅麻烦而且原理明显不如amIGM优雅
(2)可以通过调节amIGM的等值面数值决定是只展现较显著的弱相互作用,还是也把不太显著的弱相互作用一同展现。而aNCI没法做这个区分
(3)amIGM的等值面明显不像aNCI那么容易在边缘出现很严重的难看的锯齿
(4)aNCI经常会出现一些没任何意义、不对应实际弱相互作用的垃圾等值面,而amIGM没这个问题
相比之下,aNCI没有继续用的价值。Multiwfn里还支持我之前提出的aIGM,是把IGM扩展到研究动态环境,但其等值面和IGM一样非常臃肿,远不如amIGM好,因此也没有使用价值。原理上也可以把依赖于波函数的IGMH方法扩展成aIGMH,但用起来必定十分昂贵(无论是AIMD产生巨量数目的波函数文件还是aIGMH分析过程),所以笔者并没有对其效果进行检验以及在Multiwfn中实现。
下面列举amIGM的一些应用例子,令读者能充分了解amIGM的价值,图都来自于amIGM原文。
下面的amIGM和aIGM图是对标况的水盒子进行动力学模拟后得到的平均的sign(λ2)ρ着色的平均的δg_inter等值面图,用于展示一个水分子和周围的水分子间的相互作用,周围的不断运动的水的结构没有画出来。这里sign(λ2)ρ使用标准的色彩变化方式和范围,和《使用mIGM方法基于几何结构快速图形化展现弱相互作用》(//www.umsyar.com/755)里第一张图相同,后同。由下图可见amIGM图很好地把这个水分子作为氢键给体和作为氢键受体的特征展现了出来,等值面精确出现在氢键会出现的范围,非常对称,而且形状优雅、易于观看,并且淡蓝色还明确体现出其作用强度比普通范德华作用更大。aIGM的等值面虽然和amIGM相似,但过于鼓囊、肥大,丑多了,而且O-H冲着的等值面还蓝得过头了(显得化学键作用似的)。
上面的mIGM图是对动力学过程中随便取的一帧算的,可见中心水分子周围四个等值面虽然各对应一个氢键,但与水分子的C2v对称性明显不符,显然无法像amIGM那样如实地描述液态水中的平均的相互作用。
作为对比,下面给出aNCI方法的图,做法在//www.umsyar.com/186里有。下图左边部分是aNCI直接出的图,可见有一大堆红蓝相间的零碎的等值面,严重扰乱视觉。用Multiwfn做格点数据屏蔽后得到右图,依然明显不理想。虚线标注的那一大坨红蓝相间的等值面完全意义不明,箭头所示的绿色分叉的等值面的存在也难以理解,说不清楚是什么玩意儿。可见aNCI远不如amIGM。
下面这张图是amIGM方法展示的水中的苯酚与周围的水之间的相互作用,三张图分别对应不同数值的δg_inter等值面。可见0.005的图把苯酚与水之间的氢键作用区域很清楚地展现了出来,数值更小的0.003的图还同时把水与苯酚之间形成pi-氢键的位点展现了出来,数值最小的0.0018的图还同时把苯酚与水之间范德华作用为主的区域明确地展现了出来。
范德华势是笔者之前提出的弱相互作用的重要分析方法,在《谈谈范德华势以及在Multiwfn中的计算、分析和绘制》(//www.umsyar.com/551)中对螺烯吸附He原子体系用范德华势等值面图的分析方法很好地解释了动力学模拟得到的He的密度分布。下图(b)是模拟过程中He的位置的叠加图(每隔一定帧数绘制一次,按照帧号由小到大颜色按照蓝-白-红变化)。下图(a)是amIGM等值面图,由于螺烯与He的范德华作用极弱,所以平均的δg_inter的等值面数值用的是非常小的值。可见amIGM图很清晰直观地展现了在模拟过程中螺烯在哪些区域与He原子有相对明显的相互作用,和(b)图能很好地对应上,充分说明了amIGM的合理性。下图(c)图是aNCI图,可见效果十分不堪入目,乱七八糟!
下面是富勒烯在碳纳米管体系中的动力学模拟,(a)是体系示意图,(b)是模拟过程中富勒烯质心位置,可见由于动能-势能反复交换,富勒烯在碳管中反复穿梭做活塞运动。(c)是对这个动力学过程绘制的amIGM图,两种视角都给出了。可见等值面均匀、完整覆盖了碳管内壁,充分体现出整个模拟过程中富勒烯与碳管在这些区域的作用相当充分和均匀。
我在《使用Multiwfn做aNCI分析图形化考察动态过程中的蛋白-配体间的相互作用》(//www.umsyar.com/591)中曾示例如何用aNCI方法考察苄脒阳离子配体与胰蛋白酶间的动态平均的弱相互作用,下图是这个体系的amIGM分析的结果。(a)是0.006 a.u.等值面,(b)是更小的0.003 a.u.等值面,注意蛋白质部分的结构是动力学轨迹中随便取的一帧绘制的。由(a)图可清晰地看到配体的两个氨基与蛋白质有四处鲜明的氢键作用(作用中心区域的等值面明显发蓝)。(b)图的等值面范围更大,可以进一步看到配体在很多区域和蛋白质间也有显著的范德华主导的相互作用,对应绿色等值面区域。
这一节专门说一下用于Multiwfn做amIGM分析用的输入文件如何合理地准备,以及计算必须知道的要点。
做amIGM需要用户提供跑分子动力学得到的xyz轨迹文件,对此格式不了解的话看《谈谈记录化学体系结构的xyz文件》(//www.umsyar.com/477)。VMD可以载入GROMACS、AMBER、CP2K、LAMMPS等诸多程序跑动力学得到的轨迹文件,选择File - Save coordinate并且选xyz格式,就可以得到xyz轨迹文件。
标准的xyz文件里每个原子的名字都是元素名,给Multiwfn做amIGM分析的文件应当满足这一点,因为只有判断对了元素,amIGM分析的结果才是合理的。如果原子的名字不是元素名,Multiwfn会根据名字猜元素(自动去掉其中的数字,然后试图匹配各个元素名以确定元素,比如N2会被判断为氮,CA会被判断为钙),若猜错了则准分子密度无法正确构造,会导致amIGM结果虚假甚至离谱。自己用文本编辑器打开xyz文件看一下便知是否记录的是元素名,也可以看Multiwfn载入xyz文件后看屏幕上提示的化学组成是什么(即各种元素都是多少个原子)确认Multiwfn是否判断对了元素。
注:pdb格式专门定义了一列用于记录元素名,当前目录下如果有和载入的xyz文件名相同但后缀是pdb的文件,Multiwfn就会优先从pdb文件记录元素的那一列里读取元素名。如果pdb里对某些原子没有提供元素名,对这些原子Multiwfn仍会根据xyz文件里的原子名去猜。
做amIGM分析和mIGM一样需要定义片段。一般只定义两个片段,这种情况下,第1个片段必须对应轨迹中坐标被固定的部分,amIGM图会展示它与第2个组(运动的部分)的相互作用。例如之前展示的例子中,纯水盒子的模拟中一个水要被固定并作为第1个组;苯酚+水的轨迹中苯酚要被固定并作为第1个组;配体+蛋白质的轨迹中配体是被固定的并作为第1个组;富勒烯+碳纳米管的轨迹中碳纳米管要被固定并作为第1个组...再比如,如果研究固体表面吸附分子,表面要被固定并作为第1个组。被固定的部分在动力学模拟过程中可以用冻结(freeze)将坐标严格固定住,也可以用位置限制势结合足够大的力常数将坐标基本固定住。也可以动力学时先不做固定,等动力学跑完之后用VMD的Extensions - RMSD trajectory tool插件或者用GROMACS的trjconv命令结合-fit rot+trans做叠合(align)将第1个组对应的部分消除平动转动(但如果在align处理后第1个组的结构在整个轨迹中还是有较大变化,比如某个要考察相互作用的基团反复翻转,就不适合做amIGM分析了,至少对这个区域而言)。
模拟的体系里面的原子数不要太多,够用就行了,要不然amIGM分析起来慢,轨迹文件也大。比如考察水中的苯酚与水的相互作用,只要模拟的盒子比苯酚稍微大一圈,往盒子里充满水,进行动力学模拟就行了,不要把盒子尺寸弄得过大而导致填充的水太多。做amIGM分析用的动力学轨迹也可以是从完整轨迹中抠出来的一部分。比如考察水中的蛋白质与配体间的相互作用,做动力学的时候肯定是蛋白质+配体+溶液的模型,而做amIGM分析用的轨迹文件只需要包含蛋白质+配体部分即可,水的部分应该去除以避免严重浪费时间。当蛋白质较大的时候,为了避免耗时过高,还应当借助VMD的选择语句(见《VMD里原子选择语句的语法和例子》//www.umsyar.com/504)只把配体以及与配体有明显相互作用的氨基酸残基抠出来成为一个簇并保存成轨迹文件。
用于amIGM分析的凝聚相体系(如水中的苯酚)的动力学模拟最好在NVT下进行(以避免控压导致的原子位置改变对结果可能产生的不良影响),在此之前应先做NPT平衡相模拟使得盒子尺寸达到充分的平衡。
amIGM分析用的轨迹文件记录的帧显然应该涵盖你希望考察弱相互作用的模拟阶段。比如你希望考察稳定状态下蛋白质与配体的相互作用,显然应该取结构已经达到稳定的阶段。而如果模拟过程中配体反复在两种明显不同的构象A-B之间变化,我建议对轨迹做簇分析,把处于A构象的那些帧和B构象的那些帧分别提取成两个轨迹文件,分别做amIGM分析,从而能考察这两个构象与蛋白质相互作用的区别。
amIGM分析耗时和考虑的轨迹帧数呈线性正比。显然考虑的帧数越多,amIGM的结果原理上越好、其图像越能如实表现出模拟过程中的片段间平均的弱相互作用。一般建议至少考虑200帧。如果发现效果不够好,比如等值面不够连贯、不能如预期般充分完整展现平均相互作用,则应当考虑更多帧。这一点类似于计算空间分布函数(sdf),采样越充分越好。
再说一下amIGM分析用的格点。读者请先阅读《Multiwfn FAQ》(//www.umsyar.com/452)的Q39了解格点设置的基本知识。格点数据所处的盒子范围固定的情况下,格点间距越小,amIGM等值面越平滑、格点数越多、耗时越高、Multiwfn导出的cube文件越大,通常0.2 Bohr格点间距就已经够用了,要更好一点可以用0.15 Bohr。盒子的范围应该囊括并尽量刚好囊括感兴趣的弱相互作用可能出现的区域,避免该有的等值面不出现或被截断,以及避免浪费格点用于描述无意义的区域。
Multiwfn的amIGM分析过程中会自动使用节约耗时的策略,如果一个格点与第1个片段在第1帧中的任意一个原子的距离在其scaled范德华半径内,而且这个格点与其它片段的任意原子的距离在整个轨迹中至少有一次在其scaled范德华半径内,这个格点才会被考虑,否则在计算过程中会被忽视。这里scaled范德华半径是指范德华半径与Multiwfn的settings.ini中的amIGMvdwscl参数的乘积。amIGMvdwscl默认为2.0,足够稳妥又能显著节约耗时。但如果极个别情况下发现等值面看起来像是被截断了,应将amIGMvdwscl设得更大或者设为0关闭此策略。
本节将会具体演示如何绘制出来1.2节展示的各种amIGM图,用到的xyz轨迹文件都给出了,除了螺烯+He原子的体系外都是我用GROMACS程序跑出来的。GROMACS做动力学模拟的方法在北京科音分子动力学与GROMACS培训班(http://www.keinsci.com/KGMX)里讲授得极为详细,学过一遍后这些轨迹文件肯定都能自己跑出来。螺烯+He原子的体系是我用xtb程序跑的,在北京科音高级 培训班(http://www.keinsci.com/KAQC)的“从头算分子动力学”部分专门全面系统讲了怎么用xtb跑动力学并给了很多例子,其中就包括这个例子。
值得一提的是,虽然amIGM分析可以支持周期性,但这些xyz文件里并没有加入Multiwfn可以识别的盒子信息(如果加入的话,需要在注释行写入盒子的三个矢量,诸如Tv_1: 7.426 0.0 0.0 Tv_2: 3.6 6 6.40 0.0 Tv_3: 0.0 0.0 10.0)。因为这些例子中计算格点数据的区域都没有离模拟用的盒子边界太近,因此不需要考虑周期性。
这个例子的轨迹文件phenol_wat.xyz在此压缩包里://www.umsyar.com/attach/759/phenol_wat.7z。体系共1342个原子,在模拟过程中苯酚在盒子中央被固定。NVT下模拟了1 ns(之前已经过了平衡相模拟),每1 ps保存一帧,故xyz轨迹文件共1001帧。模拟控温在298.15 K。第1帧的结构如下所示,苯酚原子(1-13号原子)用CPK方式显示,水用透明棍状方式显示。
启动Multiwfn,载入phenol_wat.xyz,然后输入
20 //弱相互作用可视化分析
-12 //amIGM分析
2 //定义两个片段
1-13 //作为第1个片段的苯酚的原子序号
c //其它原子作为第2个片段
[回车] //考虑所有帧
11 //围绕接下来指定的片段往各方向延展一定距离来定义计算格点数据的空间范围
1-13 //苯酚片段的原子序号
3 A //延展距离为3埃,对此例够大了
[回车] //用默认的0.2 Bohr格点间距。这个格点间距对应的图像质量足够好了,想要等值面的边缘锯齿更少可以降低到0.15 Bohr,但耗时多一倍多
在双路7R32服务器上96核并行计算的总共耗时约100秒。在后处理菜单选3将平均的sign(λ2)ρ和平均的δg_inter格点数据分别导出为当前目录下的avgsl2r.cub和avgdg_inter.cub,然后放到VMD目录下。再把Multiwfn的examples目录下的aIGM.vmd脚本放到VMD目录下。之后启动VMD,在命令行窗口输入source aIGM.vmd执行脚本,就会马上显示出amIGM图。在VMD里进入Graphics - Representation界面可以看到两个显示方式(简称为Rep)。选择Isosurface对应的Rep后可以在界面里改Isovalue值,在Trajectory标签页里可以改色彩刻度范围。将Isovalue设为比如0.003,并且将CPK显示方式的Rep的Selected Atoms设为serial 1 to 13后,看到的图像就和1.2节展示的这个体系的图像一样了,一些箭头、文字自行ps上去即可。
如aIGM.vmd脚本的内容可以看到,默认的等值面数值是0.008,默认的色彩刻度范围是-0.05到0.05,都可以自己改。色彩刻度范围设得越小,等值面上不同特征的相互作用区域的颜色差异越大。
这个例子的通过xtb程序用GFN0-xTB方法跑出来的轨迹文件helicene-He.xyz在此压缩包里://www.umsyar.com/attach/759/helicene-He.7z。体系共43个原子,控温在10 K做了2500 ps动力学,从中均匀取了1000帧。轨迹跑完后,用VMD自带的RMSD Trajectory tool工具对螺烯部分做了align来消除其平动和转动,因此虽然在模拟过程中没有对螺烯做固定,经过这么处理后,整个轨迹中螺烯的位置、朝向都没变。并且本身螺烯是刚性的,结构波动程度甚微。
启动Multiwfn,载入helicene-He.xyz,然后输入
20 //弱相互作用可视化分析
-12 //amIGM分析
2 //定义两个片段
1-42 //作为第1个片段的螺烯的原子序号
c //其它原子作为第2个片段
[回车] //考虑所有帧
11 //围绕接下来指定的片段往各方向延展一定距离来定义计算格点数据的空间范围
1-42 //螺烯片段的原子序号
2 A //延展距离设2埃
[回车] //用默认的0.2 Bohr格点间距
在双路7R32服务器上96核并行计算的总共耗时约40秒。按前例在VMD中显示出等值面后,再把等值面数值设为很小的0.00004,图像就和第1.2节所示的这个体系的图一样。
这个例子的GROMACS程序结合GROMOS力场跑出来的轨迹文件CNT_C60.xyz在此压缩包里://www.umsyar.com/attach/759/CNT_C60.7z。体系共456个原子,一开始把富勒烯放在距离碳纳米管管口一定距离处。模拟过程控温在200 K。模拟共100 ps,每0.5 ps保存一帧,故轨迹共201帧。轨迹跑完后,用VMD的RMSD Trajectory tool工具对碳纳米管部分做了align来消除其整体运动。
启动Multiwfn,载入CNT_C60.xyz,然后输入
20 //弱相互作用可视化分析
-12 //amIGM分析
2 //定义两个片段
1-396 //作为第1个片段的碳纳米管的原子序号
c //其它原子作为第2个片段
[回车] //考虑所有帧
11 //围绕接下来指定的片段往各方向延展一定距离来定义计算格点数据的空间范围
1-396 //碳纳米管片段的原子序号
0 //延展距离设为0,因为等值面只在纳米管内壁区域出现
0.15 //用0.15 Bohr格点间距
按照之前的做法在VMD里作图,等值面数值设0.0001,就可以看到1.2节给出的此体系的图像。
这个例子的动力学模拟是用GROMACS程序结合GROMOS力场对完整蛋白质+配体+溶剂做的,在NPT预平衡后在NVT系综下模拟了1 ns,每1 ps保存一帧,共1001帧,模拟过程中将配体部分做了冻结。随后用VMD将轨迹中配体与相邻的蛋白质残基截出来构成团簇,共161原子,轨迹文件cluster.xyz在此压缩包里://www.umsyar.com/attach/759/cluster.7z。由于这个xyz文件里的原子名不是元素名,因此此压缩包里还提供了cluster.pdb,里面记录了各个原子的元素信息,从而使得Multiwfn能正确识别元素。这些文件的产生方式在《使用Multiwfn做aNCI分析图形化考察动态过程中的蛋白-配体间的相互作用》(//www.umsyar.com/591)的第2、3节有详细说明(那篇文章里文件名叫cluster),因此这里不再累述。
把cluster.xyz和cluster.pdb放在相同目录下。启动Multiwfn,载入cluster.xyz,如屏幕上的提示所示元素信息从cluster.pdb中读取了,显示的化学组成H72 C53 N16 O18 S2完全正确。然后依次输入
20 //弱相互作用可视化分析
-12 //amIGM分析
2 //定义两个片段
144-161 //作为第1个片段的配体的原子序号
c //其它原子作为第2个片段
[回车] //考虑所有帧
11 //围绕接下来指定的片段往各方向延展一定距离来定义计算格点数据的空间范围
144-161 //配体的原子序号
3 A //延展距离设为3埃
0.15 //用0.15 Bohr格点间距
在双路7R32服务器上96核并行计算的总共耗时110秒。按照之前的做法在VMD里作图,等值面数值设0.006或0.003,并恰当在VMD里设置配体和周围残基的显示方式,就可以看到1.2节给出的此体系的图像。
本文充分介绍了笔者在Struct. Bond., 190, 297 (2026)中提出的amIGM分析方法,并通过四个例子演示了amIGM在Multiwfn中的分析操作。由本文可见,amIGM分析可以非常生动直观地展现动力学过程中的分子间的平均的弱相互作用,而且分析步骤操作简单,因此非常推荐大家将之应用于实际问题的研究中。amIGM的图像效果远好于aNCI,而耗时相仿佛,因此aNCI就不需要再考虑了。
]]>文/Sobereva@北京科音 2025-Dec-7
Multiwfn是电子激发分析的十分强大的武器库,在《Multiwfn支持的电子激发分析方法一览》(//www.umsyar.com/437)里有全面盘点。其主功能18中有很多分析方法依赖于参考态轨道波函数和激发态组态系数,典型的如《使用Multiwfn做空穴-电子分析全面考察电子激发特征》(//www.umsyar.com/434)介绍的空穴-电子分析和δr指数、《在Multiwfn中通过IFCT方法计算电子激发过程中任意片段间的电子转移量》(//www.umsyar.com/433)介绍的IFCT分析、《使用Multiwfn做自然跃迁轨道(NTO)分析》(//www.umsyar.com/377)介绍的NTO分析,等等一大堆。它们通常结合目前研究电子激发最常用的TDDFT方法使用。在这些文章里我都明确示例了怎么结合Gaussian的TDDFT计算实现这些分析,而如今免费又强大的 程序ORCA的用户也很多,因此在本文专门示例一下怎么结合ORCA来实现。本文只使用如今特别流行的空穴-电子分析作为例子,其它的需要轨道+组态系数的分析方法所用的文件与空穴-电子分析完全一样,就不一一举例了。
这里我假定读者已经看过上述博文了解了空穴-电子分析的原理和用法。如果读者不了解Multiwfn的话,看《Multiwfn FAQ》(//www.umsyar.com/452)和《Multiwfn入门tips》(//www.umsyar.com/167)。读者请务必使用2025-Dec-7及以后更新的Multiwfn版本,否则情况与本文说的不符。Multiwfn可以在官网//www.umsyar.com/multiwfn免费下载。读者务必使用ORCA 6.1.1及以后的版本,本文用的是ORCA 6.1.1。我假定读者已了解ORCA的各种常识和做TDDFT的方法,在《北京科音高级 培训班(http://www.keinsci.com/KAQC)中对ORCA的各方面使用有极为全面系统的讲解,ORCA的安装方法见《 程序ORCA的安装方法》(//www.umsyar.com/451)。
本文的例子使用与《使用Multiwfn做空穴-电子分析全面考察电子激发特征》中相同的D-pi-A体系,只不过基组从6-31G*改为了ORCA用户更常用的def2-SVP。所有例子的输入输出文件都在//www.umsyar.com/attach/758/file.rar里。
在演示使用严格的TDDFT做电子激发分析之前,这一节先说ORCA默认用的TDA近似下的TDDFT的情况,即TDA-DFT的情况,这种情况最为简单。
使用ORCA运行以下输入文件,对应本文文件包里的ORCA_TDA_D-pi-A\TDA.inp,算完后得到输出文件TDA.out。还同时在当前目录下产生了一堆其它文件,除了TDA.gbw外都删掉。
! CAM-B3LYP def2-SVP pal16 tightSCF miniprint
%tddft
nroots 5
tprint 1E-8
end
%maxcore 3000
* xyz 0 1
C 3.55863800 -1.13874700 0.39983600
C 2.17031600 -1.13391800 0.39359500
...略
*
注意%tddft中的tprint 1E-8很重要,代表对电子激发贡献大于1E-8的组态都输出系数,相当于Gaussian的IOp(9/40=4)。想让结果更精确也可以设得更小,但改进甚微,而输出文件尺寸会增大、Multiwfn的分析耗时会增加。
运行orca_2mkl TDA -molden命令,会基于TDA.gbw转换出TDA.molden.input,其中记录了参考态轨道波函数,类似于Gaussian的fch文件。
启动Multiwfn,载入TDA.molden.input,然后输入
18 //电子激发分析
1 //空穴-电子分析
[回车] //这一步让用户输入ORCA的输出文件路径,直接按回车代表载入与输入文件同路径的同名但后缀为out的文件(TDA.out)
2 //以分析第2激发态为例
现在Multiwfn就从TDA.out中载入了组态系数。之后可照常做后面的分析,比如输入
1 //可视化空穴、电子、跃迁密度等函数
2 //中等质量格点
3 //同时显示空穴和电子的等值面
至少截止到笔者撰文时(2025-Dec-7)的最新版ORCA 6.1.1来说,ORCA尚无法在TDDFT计算时将激发组态系数和去激发组态系数分别输出。为了使得Multiwfn基于ORCA的TDDFT计算做空穴-电子分析可行,需要导出记录所有组态系数的json文件并令Multiwfn从其中读取。
!!注意!!由于笔者撰文时最新版ORCA对于参考态为开壳层的情况无法在json文件中以正确格式输出组态系数,因此本节的做法目前只适用于参考态为闭壳层的情况!等以后ORCA修正了这个bug,Multiwfn也会使本节的做法支持开壳层参考态。
运行以下输入文件,对应本文文件包里的ORCA_TDDFT_D-pi-A\TDDFT.inp,算完后得到输出文件TDDFT.out。还同时在当前目录下产生了一堆其它文件,除了TDDFT.gbw外都删掉。
! CAM-B3LYP def2-SVP pal16 tightSCF miniprint
%tddft
nroots 5
tda false
end
%maxcore 3000
* xyz 0 1
C 3.55863800 -1.13874700 0.39983600
C 2.17031600 -1.13391800 0.39359500
...略
*
运行orca_2mkl TDDFT -molden命令,会基于TDDFT.gbw转换出TDDFT.molden.input。
创建一个文本文件叫TDDFT.json.conf,在里面写入如下内容
{
"CIS": true,
"CISNRoots": true
}
然后运行orca_2json TDDFT.gbw,就会在当前目录下产生TDDFT.json。
说明:TDDFT.json.conf是orca_2json的控制文件,控制orca_2json在处理TDDFT.gbw时用的设置,当前内容要求把所有激发的组态系数都写入json文件,而默认不会写入。若控制文件的名字为orca.json.conf,则对于当前目录下任意名字的gbw在用orca_2json处理时都会用其中的设置。
启动Multiwfn,载入TDDFT.molden.input,然后输入
18 //电子激发分析
1 //空穴-电子分析
[回车] //载入与输入文件在同目录下同名的out文件(TDDFT.out)
2 //以分析第2激发态为例
此时如屏幕上的提示所示,由于Multiwfn发现在TDDFT.out的同目录下有名字相同但后缀为json的文件(TDDFT.json),Multiwfn就自动从json文件中载入了组态系数。json文件里记录的是全部组态系数,Multiwfn默认只载入绝对值大于1E-4的组态系数以节约之后的分析时间,这个阈值可以通过settings.ini中的ORCAloadcoeff修改。
现在就进入了空穴-电子分析界面,照常做分析即可,结果和同级别下Multiwfn+Gaussian的分析结果差异可忽略不计。
技巧:如果你把Multiwfn的settings.ini里的orca_2mklpath设为了orca_2mkl的实际路径,则以上例子中不需要手动用orca_2mkl转换gbw文件成molden.input文件,而是可以直接用Multiwfn载入gbw文件,此时Multiwfn会自动将之转换为.molden.input文件并载入,然后再删掉molden.input。
顺带再举个例子,对ORCA的TDDFT计算使用《使用Multiwfn便利地查看所有激发态中的主要轨道跃迁贡献》(//www.umsyar.com/529)介绍的功能。启动Multiwfn后载入TDDFT.out,然后进入主功能18的子功能15,就得到了如下结果,所有5个态的组态系数也都是从json文件中读取的。
# 1 3.8520 eV 321.87 nm f= 0.01007 Spin multiplicity= 1:
H-4 -> L 82.3%, H-4 -> L+2 13.0%
# 2 4.0470 eV 306.36 nm f= 0.64110 Spin multiplicity= 1:
H -> L 87.4%, H-3 -> L 5.2%
# 3 4.3730 eV 283.52 nm f= 0.00009 Spin multiplicity= 1:
H-6 -> L 84.4%, H-6 -> L+2 12.7%
# 4 4.7440 eV 261.35 nm f= 0.01900 Spin multiplicity= 1:
H -> L+1 38.7%, H-2 -> L 25.3%, H -> L+3 18.0%, H-1 -> L 5.8%
# 5 4.8350 eV 256.43 nm f= 0.00409 Spin multiplicity= 1:
H -> L+3 43.3%, H-2 -> L 41.1%, H-3 -> L+1 5.1%
文/Sobereva@北京科音 2025-Nov-24
《使用Multiwfn做IGMH分析非常清晰直观地展现化学体系中的相互作用》(//www.umsyar.com/621)中介绍的笔者提出的IGMH方法已经被广泛用于直观分析考察化学体系中的相互作用。这种分析最主要的组成部分是计算δg、δg_inter、δg_intra、sign(λ2)ρ的格点数据,这也是这种分析最耗时的过程。对于大体系,特别是在CPU比较弱的机子上,IGMH计算格点数据的分析耗时往往挺高。
大多数人用IGMH方法主要是作图分析考察片段间相互作用,这种情况实际上只需要对片段间重叠的区域计算δg_inter和sign(λ2)ρ格点数据就行了,其它区域的格点完全都不需要计算。考虑到这一点,从2025-Nov-24更新的Multiwfn版本开始,支持了一种巨幅节约IGMH图形化考察片段间相互作用耗时的做法,具体来说是这样的:在Multiwfn的settings.ini文件中现在有一个参数名为IGMvdwscl,一个片段的表面是由其中各个原子的范德华半径乘以这个系数对应的原子球叠加构成的表面。在做IGMH或mIGM或IGM分析过程中计算格点数据的那一步,如果某个格点出现在两个或多个片段的表面之间的重叠区域内,则这个格点就会被计算,否则会被直接忽略。利用这个策略,往往可以令IGMH格点数据计算过程耗时降低好几倍甚至更多。能节约百分之多少耗时具体取决于你设的格点数据分布的盒子范围包含了多少可以被忽略的格点。显然,用了这个策略后就只能对δg_inter函数的等值面作图了,而不能对δg和δg_intra等值面作图,因为只有δg_inter的等值面才肯定会落在片段间重叠区域。
IGMvdwscl默认为0,代表不启用这种节约耗时的策略。如果要启用此策略,就恰当设其数值,设得越大降低耗时效果越低,设得越小越有可能截断δg_inter等值面。一般建议用2.0,既足够安全,节约耗时的效果又足够显著。
在《8字形双环分子对18碳环的独特吸附行为的 、波函数分析与分子动力学研究》(//www.umsyar.com/674)文中介绍了我研究的OPP双环分子与两个18碳环形成的超分子复合物,文中给出了IGMH图,OPP、第一个碳环、第二个碳环各定义为一个片段。以这个体系为例,我们对比一下用和不用前述加速策略的耗时,在拥有24个物理核心的i9-13980HX CPU上Multiwfn用24核并行计算。这个体系的波函数文件2C18_OPP.wfn在这个压缩包里://www.umsyar.com/attach/756/2C18_OPP.7z。体系总共260个原子,5504个GTF(碳环用的6-311G*基组,OPP双环分子用的6-31G*)。
启动Multiwfn,载入2C18_OPP.wfn,然后输入
20 //弱相互作用可视化分析
11 //IGMH分析
3 //定义三个片段
243-260 //第1个片段原子序号
225-242 //第2个片段原子序号
c //其它原子作为第3个片段
4 //自定义格点间距或格点数,格点覆盖整个体系
0.2 //0.2 Bohr
格点数据计算总耗时达到600秒,虽然不算太长,但也得在屏幕前等好一阵,对于明显更大的体系或者更弱的CPU没准要花一个小时。对导出的格点数据用VMD作图,0.002等值面的图如下所示。
注意在Multiwfn计算完格点数据后在屏幕上还显示了三种函数的全空间积分值,对应相应格点数据数值的总和乘上格子体积:
Integral of delta-g over whole space: 231.384179 a.u.
Integral of delta-g_inter over whole space: 1.184764 a.u.
Integral of delta-g_intra over whole space: 230.199414 a.u.
下面看看使用节约耗时策略后的情况。把settings.ini里的IGMvdwscl设为2,重新启动Multiwfn并重复前面的操作,计算格点数据之前会有以下提示,说明90.96%的格点都被忽略掉了。
Prescreening grids with IGMvdwscl parameter: 2.00
Percent of screened grids: 90.96%
计算总共耗时仅为90秒,只有之前耗时的15%!当前看到的格点数据积分值如下,可见δg_inter函数的积分值几乎没变,充分说明了当前没有忽略掉δg_inter主要分布区域的格点。
Integral of delta-g over whole space: 41.955223 a.u.
Integral of delta-g_inter over whole space: 1.179150 a.u.
Integral of delta-g_intra over whole space: 40.776072 a.u.
用导出的格点数据再次绘制sign(λ2)ρ着色的δg_inter图,会看到得到的图和上面的没有任何差别!另外,使用这种降低耗时的策略也完全不会影响δg_inter与sign(λ2)ρ之间的散点图。
由此例可见,将IGMvdwscl设为2是非常安全的巨幅加速IGMH可视化展现片段间相互作用的策略,推荐使用!这个策略对《使用mIGM方法基于几何结构快速图形化展现弱相互作用》(//www.umsyar.com/755)介绍的mIGM方法同样奏效,只不过mIGM方法本身耗时就远远低于IGMH,对于本文的例子一瞬间就算完,因此这个策略对mIGM不会带来可查觉的收益。
至于IGMH、mIGM、IGM分析的后处理菜单中的计算δG_atom和δG_pair指数的功能,和本文介绍的加速策略无关,IGMvdwscl的设置不影响其耗时和结果。
]]>文/Sobereva@北京科音 2025-Nov-24
弱相互作用的图形化分析方法日趋流行,其中笔者提出的IRI和IGMH方法如今已经被使用得相当普遍,另外还有NCI、aNCI、IGM等方法。笔者专门有两篇综述文章对其进行了非常全面、完整的介绍,如果还没读过的话强烈建议阅读:
Angew. Chem.上发表了全面介绍各种共价和非共价相互作用可视化分析方法的综述
//www.umsyar.com/746
一篇最全面介绍各种弱相互作用可视化分析方法的文章已发表!
//www.umsyar.com/667
近期笔者提出了一种新的弱相互作用可视化方法称为mIGM(modified independent gradient model)并已实现在了Multiwfn程序中。如下一节所示,mIGM有重要、独特的价值。mIGM的原文如下,非常欢迎阅读和引用。使用Multiwfn做mIGM分析时请将此文与Multiwfn程序启动时提示的程序原文一起引用。
Tian Lu, Graphically revealing weak interactions in dynamic environments using amIGM method, Struct. Bond., 190, 297 (2026) DOI: 10.1007/430_2025_95
注1:此文同时作为Computational Methods for the Analysis of Non-Covalent Interactions书的一章出版
注2:mIGM方法是我提出amIGM方法时的重要副产物,所以文章标题上写的是amIGM
注3:如果没有权限访问,也可以看ChemRxiv上的预印版https://doi.org/10.26434/chemrxiv-2025-zts13,内容和正式版没明显区别。引用时请引用正式版
IGMH在前述综述里以及《使用Multiwfn做IGMH分析非常清晰直观地展现化学体系中的相互作用》(//www.umsyar.com/621)中都有充分的介绍,这里就不再多说了。mIGM方法是IGMH的变体,把IGMH中基于波函数计算的实际电子密度替换为准分子密度(promolecular density),准分子密度只需要元素和原子坐标信息就可以由Multiwfn构造出来。
mIGM分析的优点是仅依赖于几何结构而不需要波函数信息,且速度远快于IGMH。IGM方法虽然也有这方面的优点,但mIGM的图像效果明显好于IGM。因此IGM方法可以完全被淘汰了。
mIGM显然不如基于波函数计算的IGMH严格,但对于图形化考察弱相互作用的目的,多数情况下其结果不比IGMH差多少(但对于片段带显著净电荷的情况有可能差得多一点)。当然,对于不大的体系、不难获得波函数文件的情况,还是建议优先用IGMH。
由于以上特点,mIGM很适合这三种情况:
(1)需要快速得到结果的场合,尤其适用于很大体系和大批量分析
(2)作为IGMH分析前的快速预览目的
(3)不便于得到Multiwfn支持的波函数文件的情况。例如Multiwfn不支持QE、VASP、M$等完全基于平面波的第一性原理程序产生的波函数文件,这些程序的用户可以把优化完的几何结构保存成cif格式作为Multiwfn做mIGM分析的输入文件)。甚至一点都不会理论计算的人也可以直接拿较准确实验得到的pdb、cif文件做mIGM分析。
这里以苯基丙氨酸三聚体为例对比一下不同弱相互作用可视化方法的结果,先来看IGMH、IGM、NCI方法的情况。下面这张图是mIGM原文里的图,给出了sign(λ2)ρ着色的不同方法定义的等值面,IGMH和IGM分析中把每个分子被定义为了一个片段。可见IGMH图像很理想,等值面光滑、形状优雅,很好地展现出了普通范德华作用为主和氢键作用为主的相互作用区域。IGM的图很糟,等值面过于肥大,往往离原子核太近,并进而导致在箭头所示的局部区域出现不合理的橙色着色。NCI方法无法区分分子内和分子间相互作用,而且等值面显得零散、稀碎,在一些地方还有很难看的锯齿(把格点间距降到很小可以避免,但巨幅增加耗时和格点数据尺寸)。
下面再来看mIGM的图。这里给出的是sign(λ2)ρ着色的mIGM的δg_inter函数分别为0.006、0.01、0.03 a.u.的等值面,sign(λ2)ρ的色彩变化方式同前。可见效果很好,与IGMH图的效果十分接近。并且mIGM和IGMH一样,等值面的数值设得越大可以着重展现越强的相互作用。0.03的等值面中只出现了相对较强的分子间氢键作用,数值中等的0.01图中还能看到较显著的范德华作用区域,数值最小的0.006图中还把特别弱的范德华作用区域也展现了出来。
接下来就给出Multiwfn做mIGM分析的两个简单例子。第一个例子重复上面苯基丙氨酸三聚体的图,第二个例子以碲晶体为例演示将mIGM用于周期性体系。实际上mIGM和IGMH、IGM分析过程几乎完全相同,唯一差异仅仅是在Multiwfn主功能20里选择mIGM而非IGMH或IGM。因此如果你之前就看过//www.umsyar.com/621会了IGMH分析,或看过《通过独立梯度模型(IGM)考察分子间弱相互作用》(//www.umsyar.com/407)会了IGM分析,用mIGM其实都没有需要额外学的。
读者务必使用2025年11月23日及以后更新的Multiwfn版本,否则情况和下文所述不符。Multiwfn可以在官网//www.umsyar.com/multiwfn免费下载。不了解Multiwfn者建议看《Multiwfn入门tips》(//www.umsyar.com/167)和《Multiwfn FAQ》(//www.umsyar.com/452)。本文例子用的VMD是1.9.3版,可以在http://www.ks.uiuc.edu/Research/vmd/免费下载。
为了做mIGM分析,需要给Multiwfn提供记录了几何优化后的苯基丙氨酸三聚体结构信息的文件。Multiwfn支持什么格式详见《详谈Multiwfn支持的输入文件类型、产生方法以及相互转换》(//www.umsyar.com/379)。常见的xyz、pdb、cif、mol2等大量格式都可以作为输入文件。Multiwfn目录下的examples\phenylalanineresiduestrimer.xyz是优化后的三聚体的结构文件。顺带一提,如果想方便地得到里面各个分子的序号的话,可以将之载入Multiwfn,进入主功能0,选菜单栏的Tools - Select fragment,然后输入某分子中任意原子序号,则这个分子中所有原子序号都会给出,可以复制出来之后粘贴到Multiwfn窗口里用来定义片段。
启动Multiwfn,依次输入
examples\phenylalanineresiduestrimer.xyz
20 //弱相互作用可视化分析
-10 //mIGM分析
3 //定义3个片段
1-29 //第1个片段的原子序号(对应第1个分子)
30-40,52,53,56,57,63-65,77-87 //第2个片段的原子序号(对应第2个分子)
c //其它原子作为第3个片段(对应第3个分子)
4 //自定义格点间距。如果你对于定义格点的意义和方式不了解的话,建议参看《Multiwfn FAQ》(//www.umsyar.com/452)中的Q39
0.2 //格点间距设0.2 Bohr,这足以得到足够光滑的mIGM图像,想要效果更好点可以用0.15
一瞬间就算完了,之后选3把格点数据导出成cube文件,当前目录下就产生了dg_inter.cub、dg_intra.cub、dg.cub、sl2r.cub。对于展现片段间相互作用,只需要保留分别对应sign(λ2)ρ和δg_inter格点数据的sl2r.cub和dg_inter.cub文件即可,其它的可以删掉。
将sl2r.cub和dg_inter.cub挪到VMD目录下,并且把Multiwfn自带的examples目录下的IGM_inter.vmd脚本文件挪到VMD目录下。启动VMD,之后在文本窗口输入source IGM_inter.vmd,脚本就会被执行,然后看到下图
当前默认用的δg_inter等值面数值是0.01,如果想改的话,在VMD Main窗口进入Graphics - Representation,在下面标注的文本框里输入数值后按回车即可
如果想把图像效果设得像上一节展示的mIGM原文的图那样,在Graphics - Representation窗口中选中显示体系结构的那个Representation(后文简写为Rep),把Drawing Method从CPK改为Licorice,并把Bond Radius恰当设小。然后选中显示等值面的那个Rep,把Material改成AOShiny。
在Multiwfn做mIGM分析的后处理菜单还可以选择选项6在mIGM框架内计算分别衡量原子和原子对儿对特定两个片段间相互作用贡献程度的δG_atom和δG_pair指数。这两个指数在//www.umsyar.com/621和IGMH原文中都有介绍,在IGMH分析的官方教程//www.umsyar.com/multiwfn/res/IGMH_tutorial.zip中有计算例子。mIGM和IGMH框架下计算的这些指数显然在定量数值上会有所不同,但能说明的问题一致。
这里对前面的图中中央和上方两个分子之间的相互作用计算δG_atom和δG_pair指数。在之前的Multiwfn的mIGM分析的后处理菜单中依次输入
6 //计算δG_atom和δG_pair指数
2,3 //对片段2、3之间计算
3 //用Ultrafine格点计算这些指数
马上就算完了,从屏幕上的提示可见δG_atom和δG_pair指数已经被导出到了当前目录下的atmdg.txt文件中。然后再输入y导出atmdg.pdb,此文件中原子的beta因子对应的是δG_atom指数,可以在VMD中通过对原子着色来直观显示。
把atmdg.pdb载入VMD,背景设成白色,Graphics - Colors - Color Scale里把Method设为BWR(蓝-白-红方式变化),Graphics - Representation里把Coloring Method设为Beta,Trajectory标签页里把Color Scale Data Range下限和上限分别设为-5和5,此时看到的图如下。完全白色对应于δG_atom为0,暗示是对于相互作用没贡献的原子。越红对应δG_atom越大,暗示对分子间相互作用的重要性越大。提醒:δG_atom只是以粗糙方式定义的,切勿视为对片段间相互作用能的确切贡献量,它只适合直观区分不同原子对相互作用可能的重要性、令你能快速判断哪些原子很值得关注。真正要确切得到各个原子对相互作用能的贡献,应当用Multiwfn中的EDA-FF方法,介绍见《使用Multiwfn做基于分子力场的能量分解分析》(//www.umsyar.com/442)。
在atmdg.txt中可以看到片段2、3上原子的δG_atom指数和归一化后的δG_atom%指数,由高到低排序:
Atomic delta-g indices of fragment 2 and percentage contributions
Atom 57 : 0.458233 ( 22.76 % )
Atom 87 : 0.215283 ( 10.69 % )
Atom 79 : 0.187531 ( 9.31 % )
Atom 39 : 0.157183 ( 7.81 % )
...略
Atomic delta-g indices of fragment 3 and percentage contributions
Atom 58 : 0.314871 ( 15.64 % )
Atom 69 : 0.297674 ( 14.78 % )
Atom 67 : 0.227089 ( 11.28 % )
Atom 44 : 0.178482 ( 8.86 % )
...略
还可以看到两个片段的原子之间的由大到小排序的δG_pair指数和归一化后的δG_pair%指数:
Atomic pair delta-g indices and percentage contributions (zero terms are not shown)
57 67 : 0.153236 ( 7.61 % )
87 58 : 0.142887 ( 7.10 % )
57 55 : 0.077699 ( 3.86 % )
53 58 : 0.071819 ( 3.57 % )
...略
可以把上面的一些δG_pair%指数自行通过ps标注在图上,如下所示。
提示:当前atmdg.pdb里只记录了2、3片段的原子,为了确认比如δG_pair指数最大的57、67号原子对应图上哪两个,可以同时把完整结构文件phenylalanineresiduestrimer.xyz载入VMD,选择语句输入serial 57 67并设为VDW方式显示,并把Sphere Scale改小到0.3,这样就能直接在图上看到57和67号原子了。
碲晶体是由一条条碲原子链有序堆积构成的。作为mIGM方法分析周期性体系的例子,这一节使用mIGM直观展现碲晶体中的一条链与周围的链之间的相互作用。
//www.umsyar.com/attach/755/Te.cif是碲晶体的原胞。由于如下所示,其原胞太小,无法在图上展现清楚链之间的相互作用,因此做mIGM分析之前需要先把它扩成足够大的超胞。这会用到《Multiwfn中非常实用的几何操作和坐标变换功能介绍》(//www.umsyar.com/610)里介绍的功能。
启动Multiwfn,载入Te.cif,然后输入
300 //其它功能(Part 3)
7 //几何相关操作
19 //扩胞
4 //第1个轴方向扩成原先的4倍
4 //第2个轴方向扩成原先的4倍
3 //第3个轴方向扩成原先的3倍
此时可以选择0观看一下当前的结构,会看到晶胞大小已经足够大了。我们要把其中最接近晶胞中央的一条链作为第1个片段。为了获得其原子序号,在Multiwfn图形窗口顶端选择Tools - Select fragment,并且输入中央一条链上任意一个原子的序号比如98,就会返回整条链上的原子序号,并且整条链都被高亮显示了,如下所示
点右上角的Return按钮关闭图形窗口,接着在Multiwfn中输入
-10 //从几何操作界面中返回
0 //返回到主菜单
20 //弱相互作用可视化分析
-10 //mIGM分析
2 //定义两个片段
48,51,54,91,92,94,95,97,98 //第1个片段的原子序号
c //其它原子作为第2个片段
2 //中等质量格点。对于周期性来说,这个选项代表格点间距约0.25 Bohr,格点均匀分布在整个晶胞中。如果想让等值面更平滑,可以选择高质量格点,对应0.15 Bohr格点间距,此时产生的cub文件会是中等质量格点的1/(0.15/0.25)^3=4.6倍
很快就算完了,后处理菜单选2导出cube文件,再把sl2r.cub和dg_inter.cub用IGM_inter.vmd脚本在VMD中作图,默认的0.01等值面如下所示,两种视角都给出了。为了让中间的链和其它的链在图上便于区分,对中间的链设置了两个Rep,选择语句都是serial 48 51 54 91 92 94 95 97 98,着色方式都设为ColorID并选iceblue颜色,其中一个Rep用CPK风格显示,另一个Rep用DynamicBonds风格显示并且把Distance Cutoff改大到3以令碲原子间的键能被显示出来。之后再创建一个DynamicBonds风格的Rep,选择语句写not serial 48 51 54 91 92 94 95 97 98,用Name着色,材质设EdgyGlass。此外,在文本窗口中输入pbc box把格点数据的盒子边框(当前对应晶胞边框)显示出来。
由上图可清晰地看出中间的碲链的每个原子都在好几个方向与周围的链有相对明显的相互作用。还可以把等值面数值改小到0.003以让相互作用展现得更全面,此时图像如下所示,可以看到在有的区域等值面颜色相对发蓝,暗示这些区域的相互作用比绿色区域的更为显著,甚至有可能有一定共价作用成份。这点可以用《Multiwfn支持的分析化学键的方法一览》(//www.umsyar.com/471)介绍的Mayer键级在一定程度上论证。如mIGM原文中所提到,用CP2K在PBE/DZVP-MOLOPT-SR-GTH级别下对此体系计算并产生波函数文件,然后用Multiwfn计算原子间Mayer键级,上图中相对近距离接触的两个碲(二者连线穿越上图中偏蓝的等值面)之间的键级为0.137,不是非常接近0,因此暗示了很轻微的共价作用。
本文介绍并示例了Struct. Bond., 190, 297 (2026)中提出并在相互作用可视化分析综述Angew. Chem. Int. Ed., 2025, 64, e202504895 (2025)中讲到的mIGM方法。使用Multiwfn做mIGM分析速度极快,只需要原子坐标信息就能算,对于分析弱相互作用来说它通常是非常流行的IGMH方法的很好的近似,因此很有实用性,推荐大家在IGMH算不动或者波函数文件不便于得到的时候使用mIGM。此外,mIGM的提出使得IGM完全失去使用价值了,不用再考虑了。
mIGM分析是基于准分子密度的,这样的近似密度描述分子间相互作用大多能接受,因为分子间相互作用区域电子密度颇低,而且弱相互作用的共价性大多微弱因此对作用区域密度影响较小。而mIGM如果用于描述化学键作用的话就太糙了,因为化学键的形成会导致实际电子密度在成键区域显著偏离准分子密度,此时应当用IGMH(若不需要区分片段内和片段间相互作用则应当用IRI)。
虽然mIGM分析已经很快了,但如果体系巨大或者格点间距设得很小导致格点数很多,计算还是会花一定时间。此时推荐使用《通过格点屏蔽巨幅降低IGMH可视化分析片段间相互作用的耗时》(//www.umsyar.com/756)介绍的方法,对mIGM也同样适用,往往可以节约好几倍的格点数据计算耗时。
由于mIGM非常快,因此对不太大的体系算分子动力学过程产生的几百、几千帧结构都比较容易。基于这一点,我在Struct. Bond., 190, 297 (2026)中还将mIGM扩展到了用于可视化研究动态环境中的平均弱相互作用的情况,称为amIGM方法。这个方法远远比《使用Multiwfn研究分子动力学中的弱相互作用》(//www.umsyar.com/186)中介绍的目的相似的aNCI方法好用,在《使用amIGM方法图形化直观展现动态过程中的平均弱相互作用》(//www.umsyar.com/759)中对amIGM做了非常详细的介绍并且给出了丰富的在Multiwfn中计算的例子,非常欢迎阅读!]]>
文/Sobereva@北京科音 2025-Nov-19
很多人在对周期性体系绘制三维函数(如电子密度差)的等值面时,容易遇到一个情况是发现感兴趣的等值面在晶胞的边缘,导致等值面被截断,无法观看完整。虽然VMD程序在显示格点数据等值面的时候可以要求把周期镜像显示出来,从而试图让位于晶胞边缘的等值面看起来完整,但等值面在晶胞边界的位置会不连贯,有个突变,因而还是不好看。还有一个解决方法是先用《Multiwfn中非常实用的几何操作和坐标变换功能介绍》(//www.umsyar.com/610)里提供的功能令晶胞进行平移使得感兴趣的区域在盒子中央,然后再重新计算格点数据,但这个过程不仅麻烦而且还花费重算一次的时间。
为了完美地解决以上问题,在2025-Nov-19更新的Multiwfn中增加了一个新功能,可以令格点数据连带着原子坐标在盒子的第1、2、3个轴上分别平移特定百分比,从而将感兴趣的等值面移到便于观察的地方,整个过程瞬间完成。下面就通过两个实际例子演示一下。Multiwfn可以在官网//www.umsyar.com/multiwfn免费下载,不了解Multiwfn者建议看《Multiwfn FAQ》(//www.umsyar.com/452)。记录格点数据最常用的格式是cube,不了解的话建议看《Gaussian型cube文件简介及读、写方法和简单应用》(//www.umsyar.com/125)。
北京科音CP2K第一性原理计算培训班(http://www.keinsci.com/KFP)里我讲CP2K做水合电子的AIMD模拟的幻灯片中,给了三个时刻的自旋密度等值面的图片,如下所示。由图可见从2000 fs时开始形成水合电子,到了2100 fs时水合电子已经完全形成。然而2100 fs时的等值面在盒子最边上,看起来很不舒服。这个问题靠前述的Multiwfn的格点数据平移功能即可解决。
2100 fs时刻CP2K产生的这个体系的自旋密度的cube文件MD-SPIN_DENSITY-1_2100.cube在//www.umsyar.com/attach/754/file.rar中。我们先看一下等值面图,用VMD、VESTA、Multiwfn等观看都可以。此例用Multiwfn载入cube文件后,进入主功能0,把等值面数值设为0.001,并且点击show data range复选框要求显示格点数据盒子边框后就可以看到下图
显然,为了让等值面位于盒子中央便于观看,应该对体系在第1个轴(当前对应X轴)的负方向平移30%左右;在第2个轴(当前对应Y轴)的正方向平移约50%;在第3个轴(当前对应Z轴)上用不着平移。
关闭图形窗口回到Multiwfn主菜单,依次输入
13 //处理内存中的格点数据的功能
19 //平移格点数据
-0.3 //在第1个轴负方向平移30%
0.5 //在第2个轴正方向平移50%
[回车] //不在第3个轴方向上平移
此时屏幕上看到如下提示,显示了在各个方向上平移了多少个格点,以及平移矢量。注意这里都是按正值显示(由于周期性,前面输入-0.3等同于输入了0.7)。
Translate along the 1st axis by 62 grids
Translate along the 2nd axis by 45 grids
Translate along the 3rd axis by 0 grids
Translation vector: 8.630404 6.264003 0.000000 Angstrom
当前程序检测到在平移后有些原子露在了盒子外面,问你是否把它们卷到盒子里,这里输入y要求卷入。
现在格点数据就处理好了。可以选择选项0把格点数据导出为新的.cub文件,也可以直接选选项-2观看等值面,现在看到的图如下。可见等值面已完全在盒子中央了,非常容易考察水合电子的形态。
此功能对任何函数的格点数据都可以用。格点数据可以是从cube、CHGCAR等Multiwfn支持的记录格点数据的文件中读取的,也可以是Multiwfn的主功能5等功能基于波函数文件直接计算出来并存在内存中的。
本文介绍的功能对于盒子是非正交的情况也可以照常用,平移的方向对应于实际三个轴的方向,只不过Multiwfn目前无法正确显示这种情况的等值面,应当用VMD、VESTA等程序显示。
前面的例子中,格点数据对应的盒子(即均匀分布的格点所处的范围)和做周期性第一性原理计算对应的盒子(对晶体体系来说也相当于晶胞)是完全一致的。如果格点数据的盒子范围和周期性计算用的盒子范围不对应,比如计算格点数据的区域只是整个体系中的一小块,那么使用本文的功能就没任何意义。
如果你的体系本来就没周期性,本文的功能虽然也能使用,但并没有任何实际意义。
如果本文的功能给你的研究带来了便利,发表文章时请引用Multiwfn启动时提示的原文。
]]>文/Sobereva@北京科音 2025-Oct-31
碳原子形成环状的体系如今受到越来越多的关注,自2019年合成的18碳环(cyclo[18]carbon)开始,目前已经有越来越多的碳单环体系被合成,小到C6,大到C48、C50碳环的合成都已经被报道,碳环的复合物、衍生物在未来极可能成为有重要实际应用价值的一类体系。北京科音自然科学研究中心(http://www.keinsci.com)的卢天和江苏科技大学的刘泽玉等人近年来对碳环类体系做了大量的理论研究工作,汇总见//www.umsyar.com/carbon_ring.html,近期发表的综述见Acc. Mater. Res., 6, 1220 (2025) https://doi.org/10.1021/accountsmr.5c00131。
超碱原子是具有M3O化学组成的三角形的簇,M是碱金属原子。M3O的电离能比碱金属原子还要更小,早已被用于设计具有显著非线性光学性质的体系,典型的如卢天、丁迅雷等人在J. Comput. Chem., 38, 1574 (2017)中构造的M3O@Si12C12型体系。将M3O和碳环相结合能够获得具有何种特征的体系,无疑十分值得探索。最近卢天和刘泽玉等人共同理论研究了C2n(n=5-10)碳环与超碱原子M3O(M=Li,Na,K)形成的复合物,十分全面系统地考察了这些复合物的几何结构、电子结构、分子间相互作用、光学吸收、非线型光学性质。研究成果已经发表在英国皇家化学会RSC旗下的J. Mater. Chem. C期刊上,欢迎阅读和引用:
Wenwen Zhao, Jiaojiao Wang, Xiufen Yan, Tian Lu,* Zeyu Liu,* Obtaining excellent optical molecules by screening superalkali-doped cyclo[2n]carbons, M3O@C2n (M = Li, Na, and K, n = 5–10), J. Mater. Chem. C , 13, 17862 (2025) http://doi.org/10.1039/d5tc01675d
此研究表明M3O与碳环可以组成静电吸引作用主导的盐型复合物[M3O]+@[C2n]-,体系的极化率随着原子序数的增加、碳环尺寸的增加而增大,并且具有显著的各向异性。而第一超极化率的变化不具有很强的规律性,筛选发现其中Li3O@C20具有显著的第一超极化率,且只在>200 nm的近紫外和可见光范围具有吸收。本研究对基于碳环构造具有特殊非线型光学特征的体系给予了新的启示,充分体现了将超碱原子置入碳环或其衍生物是一种可行的设计非线性光学材料的思路!
具体内容请阅读原文,以下仅对文中的部分图片进行展示。
不同超碱原子M3O与不同碳环形成的复合物的势能面极小点结构:
//www.umsyar.com/621介绍的IGMH方法展现的M3O与C20碳环之间的相互作用特征、不同M3O@C2n复合物的相互作用能,以及//www.umsyar.com/685介绍的sobEDAw方法做的能量分解
不同M3O@C2n复合物的各向同性极化率,以及按照//www.umsyar.com/547介绍的方法图形化展现的Li3O@C20的第一超极化率张量
M3O@C20的极化率和第一超极化率随碱金属原子的变化,以及极化率和第一超极化率随外场频率的变化
Li3O@C20的电子光谱、可见光范围的关键激发态S0-S8的轨道跃迁特征,以及按照//www.umsyar.com/434介绍的方法展现的空穴和电子分布。