{"id":46537652,"url":"https://github.com/yangwangmadrid/mbfo","last_synced_at":"2026-03-07T00:11:53.403Z","repository":{"id":175801603,"uuid":"654493447","full_name":"yangwangmadrid/mbfo","owner":"yangwangmadrid","description":"A program for Maximum Bonding Fragment Orbital (MBFO) analysis","archived":false,"fork":false,"pushed_at":"2023-06-18T07:26:09.000Z","size":959,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-26T06:41:22.904Z","etag":null,"topics":["bonding","bonds","chemical-bonding","chemistry","dft-calculations","interaction","molecular-fragments","orbitals"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yangwangmadrid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-16T08:48:03.000Z","updated_at":"2023-12-11T09:16:08.000Z","dependencies_parsed_at":"2023-07-19T21:15:24.869Z","dependency_job_id":null,"html_url":"https://github.com/yangwangmadrid/mbfo","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"0e8c9a65d7ee645b61331bfd3f4dd6f7ab2ceb5b"},"previous_names":["yangwangmadrid/mbfo"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yangwangmadrid/mbfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangwangmadrid%2Fmbfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangwangmadrid%2Fmbfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangwangmadrid%2Fmbfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangwangmadrid%2Fmbfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yangwangmadrid","download_url":"https://codeload.github.com/yangwangmadrid/mbfo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangwangmadrid%2Fmbfo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bonding","bonds","chemical-bonding","chemistry","dft-calculations","interaction","molecular-fragments","orbitals"],"created_at":"2026-03-07T00:11:52.810Z","updated_at":"2026-03-07T00:11:53.391Z","avatar_url":"https://github.com/yangwangmadrid.png","language":null,"readme":"# mbfo: A program for Maximum Bonding Fragment Orbital (MBFO) analysis\n\nA useful tool for analyzing the chemical interactions between any two fragments of a molecule on the basis of a standard DFT or Hartree-Fock calculation.\n\n\u003cimg src=\"https://raw.githubusercontent.com/yangwangmadrid/mbfo/main/images/toc.png\" \n     alt=\"Logo of the mbfo program\" title=\"mbfo\" width=480 /\u003e\n\n\n**Download link for the latest v1.1 version**:\nhttps://github.com/yangwangmadrid/mbfo/releases/download/v1.1/mbfo_v1.1_release.zip\n\n\n## How to cite\n\nIf you have used the mbfo program in your research papers or presentations, \nit is obligatory to cite the following paper:\n\n1. Yang Wang. Maximum bonding fragment orbitals for deciphering complex chemical interactions. *Phys. Chem. Chem. Phys.* 2018, 20, 13792-13809. [DOI:10.1039/C8CP01808A](https://pubs.rsc.org/en/content/articlelanding/2018/cp/c8cp01808a)\n2. Yang Wang. The mbfo program. 2023. [https://github.com/yangwangmadrid/mbfo](https://github.com/yangwangmadrid/mbfo).\n \n\n## Copyright and license\nThe Author of the mbfo program is Yang Wang \n(yangwang@yzu.edu.cn; orcid.org/0000-0003-2540-2199). The mbfo program is \nreleased under GNU General Public License v3 (GPLv3).\n\n\n## Disclaimer\nThe mbfo program is provided as it is, with no warranties. The Author shall \nnot be liable for any use derived from it. Feedbacks and bug reports are always \nwelcome (yangwang@yzu.edu.cn). However, it is kindly reminded that the Author \ndoes not take on the responsibility of providing technical support.  \n\n\n## How to install\n\n### Requirements\n- python \u003e= 3.6\n- numpy \u003e= 1.18.0\n- scipy \u003e= 1.5.1\n- matplotlib \u003e= 3.5.1\n\n### Installation\n1. Place the folder of the mbfo package to any location as you like, which is\n referred to as the source directory hereafter.\n2. In the source directory, copy the template file \"mbfo_v*_template.sh\" to \"mbfo\" and make the latter executable in command line:\n```\ncp mbfo_v*_template.sh mbfo\nchmod a+x mbfo\n```\nThen, open file \"mbfo\" with a text editor and set the `MBFO_DIR` variable as the path of the source directory.\n\n3. Add the source directory to the global environment variable `PATH` in e.g.,\n\".bash_profile\" or \".bashrc\" under your HOME directory. To this end, the\nfollowing line (as an example) can be added to ~/.bash_profile:\n```\nexport PATH=$PATH:${HOME}/softwares/mbfo_v1.0_release\n```\nNow, type the following command in terminal window to take effect immediately:\n```\nsource ~/.bash_profile\n```\n\n4. Type `mbfo` in your terminal window. If the program is installed correctly, you shall see the following output:\n```\nmbfo version x.x (*** 2023)\n  -- A program for Maximum Bonding Fragment Orbtal (MBFO) analysis\nWritten by Yang WANG [yangwang@yzu.edu.cn]\nCopyright 2023 Yang Wang\n\nUsage: python mbfo.py \u003cinput-file\u003e\n```\n\n\n## How to use\n\n### Gaussian calculations\n1. In the Gaussian input file (e.g., abc.gjf), add in the route section the\nkeywords `fchk=All Pop=NBO6Read`, and at the end of the file add\n`$NBO NOBOND AONAO=W $END`. In this way, the checkpoint file \"Test.FChk\" and the\n NBO matrix file \"abc.33\" will be generated. Then, rename \"Test.FChk\" to\n\"abc.fchk\". The Gaussian output file should have the extension name of \".out\"\n(If necessary, \"abc.log\" ought to be renamed as \"abc.out\").\n \n**NOTES**:\n- It is strongly recommended to use the NBO program later than version 5.0. The\nfree version of NBO 3.1 implemented in Gaussian package would be problematic and\n give unreliable results.\n- Do not use `fchk=All` to generate the checkpoint file if there are two such\njobs running at the same working directory at the same time. Otherwise, the two\njobs will write the same \"Test.FChk\" file. Instead, add the `%chk=abc.chk` line\nto obtain the checkpoint file \"abc.chk\". Then, use Gaussian's formchk utility to\n convert \"abc.chk\" to \"abc.fchk\".\n\n2. Make sure that at least the following two files, as the inputs for mbfo, are in the same working directory:\n- abc.fchk\n- abc.33 \n\n3. Change to the working directory and prepare the input file for mbfo (vide \ninfra), e.g., \"abc.inp\". The keywords and options in the input file will be explained below in order to conduct a user-specified MBFO analysis.\n\n4. Simply execute the following command:\n    `mbfo abc.inp \u003e abc.mbfo`\n\nAs you see, you will find the MBFO analysis results in file \"abc.mbfo\".\n\n\n### A simple example to start with MBFO analysis\n\nTaking $\\mathrm{PtCl}_{4}^{2-}$ dianion as a simple example, the bonding nature between the\ncentral $\\mathrm{Pt}^{2+}$ and the ligands, four $\\mathrm{Cl}^{-}$. All input and output files of this example can be found in folder \"examples/\".\n\nFirst, we carry out a DFT single-point calculation, based on the optimized\ngeometry, to obtain the two files, PtCl4-2.fchk and PtCl4-2.33, as required by\nthe mbfo program. The Gaussian's input file (PtCl4-2.gjf) for producing the above two files is as follows:\n```\n# PBEPBE/Def2TZVPP fchk=All Pop=NBO6Read NOSYMM\n \nFrom PtCl4-2_opt.out\n\n-2 1\n    78   -1.542120   -1.576087    0.000000\n    17    0.818936   -1.576087    0.000000\n    17   -1.542120    0.784968   -0.000000\n    17   -3.903175   -1.576087    0.000000\n    17   -1.542120   -3.937142   -0.000000\n \n$NBO\n  NOBOND\n  AONAO=W\n$END\n```\n\nNext, we prepare a text file named PtCl4-2.inp with the following content:\n```\nFile =  PtCl4-2        # Key name of the files for the calculated system\nFrag = 1               # Index(es) of the atoms for defining fragment A\nWriteOrb = MBFO, MBO   # Write the MBFOs and MBOs to external fchk files\nPlotCut = 0.1          # Only plotting MBFOs/MBOs with BO \u003e this threshold\nExportPlot = TRUE      # Export the orbital diagram to a *_diagram.pdf file\n```\n\n**NOTE**: \ni) The letters in mbfo's input file are *case-insensitive*.\nii) All text following the '#' sign is commentary.\niii) Indices of atoms for `Frag` can be defined in a more compact way following the MATLAB colon syntax and the order does not matter, for example:\n```\nFrag = 10, 3:5 9 8/1\n```\nThis example means that seven atoms, 1, 3, 4, 5, 8, 9 and 10, are defined as fragment A while the rest of atoms are defined as fragment B.\n\nThen, we run mbfo using the following command under the working directory:\n```\nmbfo PtCl4-2.inp \u003e PtCl4-2.mbfo\n```\nWe will see a graphic window pop up showing the orbital correlation diagram, as\nfollows. \n\n\u003cimg src=\"https://raw.githubusercontent.com/yangwangmadrid/mbfo/main/images/PtCl4-2_diagram.png\" alt=\"MBFO/MBO diagram of PtCl4-2\" title=\"MBFO/MBO diagram of PtCl4-2\" width=600 /\u003e\n\nThis diagram has also been exported to the file PtCl4-2_diagram.pdf.\n\nAs we can see, there are only two major bonding interactions between $\\mathrm{Pt}^{2+}$ and the ligands with a considerable bond order (BO \u003e 0.1, as specified by `PlotCut` in PtCl4-2.inp). In the output file PtCl4-2.mbfo, we can find the BO values of these two major bonding interactions, being 0.997 and 0.785:\n```\nNo.      BO  Occ(A)  Occ(B)     E(A)     E(B)    E(AB)   E*(AB)    Eint\n------------------------------------------------------------------------\n  1 0.99728 1.05212 0.94788     1.79     2.26    -2.41     6.46   -8.41\n  2 0.78525 0.53659 1.46341    11.24     1.46    -4.20    16.90  -11.32\n... ...\nTOT 1.95144                                                      -21.77\n```\nBoth BO values are close to 1 and the total BO between $\\mathrm{Pt}^{2+}$ and the ligands\nis close to 2 (1.951), suggesting that in this complex $\\mathrm{Pt}^{2+}$ forms practically\na double bond with the ligands and hence it is not a typical ionic compound and\ninstead a covalent one.\nThe above table also provides more information about the two major pairs of\nMBFOs, including their occupanies, energies, and interaction energies between\nthem.\nThe table following the above table in PtCl4-2.mbfo lists the atomic orbital hybridization of the MBFOs, as follows:\n```\nHybridization of MBFOs (alpha+beta spin):\n                 MBFO(A)                         MBFO(B)\n------------------------------------------------------------------------\nNo.     s    p    d    f    g    h      s    p    d    f    g    h\n------------------------------------------------------------------------\n  1  0.00 0.00 1.00 0.00 0.00 0.00   0.08 0.91 0.01 0.00 0.00 0.00\n  2  0.93 0.00 0.07 0.00 0.00 0.00   0.21 0.79 0.00 0.00 0.00 0.00\n... ...\n```\nWe see that the first MBFO of $\\mathrm{Pt}^{2+}$ (fragment A) is purely a d orbital while\nthe first MBFO of the ligands (fragment B) take an sp11 (ca. 0.91/0.08) hybridization for the $\\mathrm{Cl}^{-}$ anions. For the second pair of MBFO, $\\mathrm{Pt}^{2+}$ utilizes mainly its s orbitals whereas $\\mathrm{Cl}^{-}$ anions takes a hybridization of sp3.8 (ca. 0.79/0.21).\n\nTo further to confirm the above analysis, we shall like to visualize these two\nleading pairs of MBFOs to see their shapes and how they overlap with each other.\nTo this end, we need to generate from the PtCl4-2_MBFO.fchk file the cube file\nof these MBFOs by using Gaussian's cubegen utility:\n```\ncubegen 0 mo=1 PtCl4-2_MBFO.fchk PtCl4-2_MBFO-A1.cube -3 h\ncubegen 0 mo=23 PtCl4-2_MBFO.fchk PtCl4-2_MBFO-B1.cube -3 h\ncubegen 0 mo=2 PtCl4-2_MBFO.fchk PtCl4-2_MBFO-A2.cube -3 h\ncubegen 0 mo=24 PtCl4-2_MBFO.fchk PtCl4-2_MBFO-B2.cube -3 h\n```\nOpen the cube files PtCl4-2_MBFO-A1.cube and PtCl4-2_MBFO-B1.cube with JMol, we\ncan visualize the overlap between the first pair of MBFOs using the following\nscript in JMol's console:\n```\nzap\nset frank off\nbackground white\nload PtCl4-2_MBFO-A1.cube\nisosurface A cutoff 0.05 sign red blue PtCl4-2_MBFO-A1.cube translucent 0.3\nisosurface B cutoff 0.05 sign pink skyblue PtCl4-2_MBFO-B1.cube translucent 0.3\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/yangwangmadrid/mbfo/main/images/PtCl4-2_MBFO-1.png\" alt=\"MBFO/MBO diagram of PtCl4-2\" title=\"MBFO/MBO diagram of PtCl4-2\" width=360 /\u003e\n\nAs we can see, the most important interaction is basically the chemical bonding between Pt's d(x2-y2) orbital and Cls' p orbitals. The second pair of MBFOs can be visualized by JMol in a similar way:\n```\nzap                                                       \nset frank off                                             \nbackground white                                          \nload PtCl4-2_MBFO-A2.cube                                 \nisosurface A cutoff 0.05 sign red blue PtCl4-2_MBFO-A2.cube translucent 0.3\nisosurface B cutoff 0.05 sign pink skyblue PtCl4-2_MBFO-B2.cube translucent 0.3\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/yangwangmadrid/mbfo/main/images/PtCl4-2_MBFO-2.png\" alt=\"MBFO/MBO diagram of PtCl4-2\" title=\"MBFO/MBO diagram of PtCl4-2\" width=360 /\u003e\n\nEvidently, the second most important bonding is practically between Pt's s\norbital and each of the Cls' sp4 hybridized orbitals.\n\n\n\n### More keywords and options\n\n  - **`Plot:`**  *`bool`*\n        \n        Whether or not plot the orbital correltion diagram for MBFOs/MBOs\n        \n        Default: TRUE\n        \n\n  - **`PlotCut:`**  *`a positive_value`* or *`a negative_value`*\n  \n        In the orbital correltion diagram, only draw MBFOs/MBOs with a bond order (or an orbital interaction energy) \n        more significant than the cutoff value. \n        Positive and negative cutoff refer, respectively, to bond order and interaction energy in kcal/mol.\n        \n        Default: 0.01\n        \n\n  - **`LabelPlot:`**  *`TRUE`* or *`FALSE`*\n  \n        Whether or not show the labeling of MBFO/MBO levels in the orbital correltion diagram\n        \n        Default: TRUE\n        \n\n  - **`PrintPop:`**  *`bool`* \n  \n        Whether or not print population analysis based on the Mulliken scheme and on the natural atomic orbitals\n        \n        Default: FALSE\n        \n\n  - **`WriteOrb:`**  *`MBFO`* and/or *`MBO`* and/or *`NAO`* and/or *`AO`* \n  \n        Write the corresponding orbtials to external fchk files\n        \n        Default: None\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangwangmadrid%2Fmbfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyangwangmadrid%2Fmbfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangwangmadrid%2Fmbfo/lists"}