{"id":19110276,"url":"https://github.com/nnairiitk/vreco_cpmd","last_synced_at":"2026-02-25T02:33:32.706Z","repository":{"id":189761305,"uuid":"92246906","full_name":"NNairIITK/Vreco_CPMD","owner":"NNairIITK","description":"CPMD Free Energy Surface Reconstruction","archived":false,"fork":false,"pushed_at":"2018-05-14T14:32:33.000Z","size":8725,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-02T12:46:49.593Z","etag":null,"topics":["fortran","fortran90","metadynamics"],"latest_commit_sha":null,"homepage":"http://nnlabdoc.netlify.com/vreco_cpmd/introduction/","language":"Roff","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/NNairIITK.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-24T03:42:32.000Z","updated_at":"2023-07-12T13:36:33.000Z","dependencies_parsed_at":"2023-08-21T17:46:30.933Z","dependency_job_id":null,"html_url":"https://github.com/NNairIITK/Vreco_CPMD","commit_stats":null,"previous_names":["nnairiitk/vreco_cpmd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NNairIITK/Vreco_CPMD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NNairIITK%2FVreco_CPMD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NNairIITK%2FVreco_CPMD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NNairIITK%2FVreco_CPMD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NNairIITK%2FVreco_CPMD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NNairIITK","download_url":"https://codeload.github.com/NNairIITK/Vreco_CPMD/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NNairIITK%2FVreco_CPMD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395912,"owners_count":25979691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fortran","fortran90","metadynamics"],"created_at":"2024-11-09T04:24:20.429Z","updated_at":"2025-10-05T00:55:55.460Z","avatar_url":"https://github.com/NNairIITK.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vreco_CPMD\n\n## Installation Instructions\n\nThis is the development version of the code and needs to be configured as follows:\n\n```bash\n$ aclocal\n$ autoheader\n$ autoconf\n$ automake --add-missing\n$ ./configure\n$ make\n```\n\nManual for Vreco_CPMD.f90 code version 10.3 (Nisanth N. Nair 08/07/08)\n\n## General Description\n\nThis program   is useful for  reconstructing the  free energy  surface  from a\nmetadynamics simulation using CPMD.  There  is no limitation  on the number of\ncollective variables (CV) the program can handle. For runs with 1 (2) CVs, the\n2D (3D)   reconstructed  free energy surfaces,  can  be  viewed in  GNUPLOT or\nOpenDX. For a 3 CV case, it is possible to print the 4D free energy surface in\na cube file format  (for e.g., then  using  VMD/OpenDX to visualize). See  the\nexample directory for examples to plot and visualize the data.\n\nImportant to note that, F(s), the free energy in collective variable space, is\nprinted, where\n\nF(s) = -- SUM_t  V(t,s).\n\nHere V is the biasing  potential added at time t  in the collective variable\nspace s.\n\n## Compiling Vreco_CPMD.f90\n\n\nAdjust the Makefile for your compiler, if needed, and type:\n\nmake\n\nNote that this program is written  in free format  standard FORTRAN 95. It was\ntested with  and without  optimization  with Intel Fortran  version 9.0,  9.1,\n10.1, g95 v0.91, gfortran v4.1.2, PGI's pgf90 version 6.2-5 and 7.1-6, and IBM\nXLF v9.1 showing reasonably good performance.\n\nThe code  is also parallelized using  OpenMP.  You  have to  set the  required\ncompiler flags for that to enable OpenMP directives. Some  examples are in the\nMakefile.  Many OpenMP compilers will try to use all available cpus, which may\nlead to suboptimal performance. This can be modified by setting the environment \nvariable OMP_NUM_THREADS. e.g., to use two threads do:\n\n```bash\nenv OMP_NUM_THREADS=2 ./Vreco_CPMD.x \u003c vreco.inp \u003e vreco.out\n```\n\nThe output will indicate, whether you have an  OpenMP compiled version and how\nmany threads  will be used. Please  note that when  using PRINT DYNAMIC OpenMP \nperformance is only good for large values of PRINT_FRQ.\n\n## Using Vreco_CPMD.x\n\n\nThe program reads in the files 'colvar_mtd' and 'parvar_mtd' generated by CPMD\nmetadynamics runs to reconstruct the free energy surface. Gaussian centers and\nscaling factors during the runs are taken from 'colvar_mtd' and Gaussian width\nand  heights are taken  from 'parvar_mtd'.  Copy or  link those  files  to the\nworking directory (they will _not_ be overwritten) and run an input.\n\n```bash\n./Vreco_CPMD.x \u003c vreco.inp  \n```\n\nor\n\n```bash\n./Vreco_CPMD.x \u003c vreco.inp \u003e vreco.out\n```\n\nSome keywords are required to  instruct the program on what  to do.  They  are\nread  standard input file, best  through I/O redirection;  see below a list of\nthe individual input keywords and their function.\n\nThe  final  reconstructed potential  will be written  to  'V.final.out' and/or\n'V.final.cube'; see  below for  details.  If PRINT  DYNAMIC  is present in the\ninput file (see below) 'V.dynamic.out' contain the potentials reconstructed at\ngiven intervals of metadynamics steps.\n\n---------------------------------------------------------------------------------\n### Input keywords for Vreco_CPMD.f90\n---------------------------------------------------------------------------------\n\nIMPORTANT: Input file should begin with the keyword NCV and end with END.\n\nRequired keywords:\n\n  NCV: \n         Number of CVs used in the simulations is read from the next line.\n         This has to be the first keyword.\n\n  GRIDS: \n         Grid on which the  reconstruction has to be  performed, is read from\n         the following  NCV lines.  Minimum  value of  the grid, the  maximum\n         value of the grid and the grid-width  are read for  each set of CVs,\n         in the same order as in the CPMD input file.   Units of CVs are same\n         as  in colvar_mtd output (note: even  if ANGSTROM keyword is present\n         distances are in Bohr units in colvar_mtd file). Consult CPMD manual\n         for details on units.\n         \n  HILLS { [SPHERE] [TUBE [RCUT]] }:\n        Type of biasing potential used (same keywords as in CPMD input file)\n        If SPHERE is present spherical Gaussians are used in the CPMD run. \n        If TUBE is present tube-type Gaussians are used.\n        If RCUT is present together with TUBE , shifted Gaussians are used. \n        Gaussians are then trimmed after hill_width*RCUT_value. The RCUT_value \n        is read from the next line if RCUT is present.\n        IMPORTANT! no other biasing potentials types are implemented in this version!\n\n END   \n        This must be the last keyword and is _required_.\n\nOptional keywords: the following keywords must appear before the \"END\" keyword.\n\n  [ PRINT { [DYNAMIC] [WALKER] }]:\n        If  DYNAMIC is  present the  reconstructed potential  is printed out\n        during  every PRINT_FRQ  metadynamics  steps to  the 'V.dynamic.out'\n        file. The   printing frequency, PRINT_FRQ,  is  read  from  the next\n        line. Note: each column (after the grid value, if  OUT GRID is used)\n        will be the potential  during  the metadynamics steps  in increasing\n        order. Similarly,    printing  the walker   position  and  the total\n        potential at each  walker positions can  be requested by the keyword\n        WALKER.    the  corresponding  output  file   is  'walker.out'.  The\n        frequency of printing PRINT_FRQ is read from the next line.  One can\n        use PRINT DYNAMIC and  PRINT  WALKER  together, but also as separate\n        keywords.\n\n  [ OUT { [GRID] [NOGRID] } ]  (OUT GRID is the default)\n        The reconstructed potential is  printed  out with the grid  position\n        values (as first NCV columns) if OUT GRID is used.  If OUT NOGRID is\n        present, the grid positions will not be printed.\n\n  [ UNITS { [KJ] [KC] [AU] }]   (AU is default)\n        Units  of energy used by the  program for printing the free energies\n        or  potential.  KJ  stands for kJ/mol,   KC for kcal/mol  and AU for\n        atomic units. IMPORTANT! This is only used  for (all) output of this\n        program; CPMD units used in  the colvar_mtd and parvar_mtd files are\n        properly taken care of by the program.\n\n\n  [ METASTEP ] \n        Number of metadynamics steps to reconstruction is read from the next\n        line. Default is to use all steps from colvar_mtd file.\n        \n  [ CUBE [FULL] [CVMDCK] [COLVAR] [ONLY] ]\n        Print  the reconstructed potential to  a  Gaussian-style cube format\n        file.   Only allowed for  cases having 3  CVs.  FULL is the default;\n        the full   final  reconstructed free energy   surface  is written to\n        'V.final.cube'.  If   CVMDCK is  also present, then   the collective\n        coordinates along the trajectory present in the 'cvmdck_mtd' file is\n        read   in,  and the    potential  along  this  path  is   written to\n        'V.cvmdck.cube'   If COLVAR is also  present,  then  the free energy\n        values along the collective   variable in the 'colvar_mtd'  file  is\n        written to 'V.colvar.cube'.   If ONLY is present, 'V.final.out' will\n        not be written together with the above cube files.\n\n---------------------------------------------------------------------------------\n### Output files\n---------------------------------------------------------------------------------\n\nV.final.out\n        Reconstructed   free energy surface F(s). Units   of  free energy is\n        according to the keyword UNITS (see above). IF OUT GRID is used, the\n        format of printing will be as follows for a 2 CV case:\n        \n        grid_x0    grid_y0             F(x0,y0) \n        grid_x0    grid_y0+dy          F(x0,y0+dy) \n        .......\n        grid_x0    grid_y0+(Ny-1)*dy   F(x0,y0+(Ny-1)*dy) \n              -blank line-\n        grid_x0+dx grid_y0             F(x0+dx,y0)\n        grid_x0+dx grid_y0+dy          F(x0+dx,y0+dy)\n        .......\n        \n        If  OUT NOGRID is  used, then the  first two columns will be absent;\n        everything else is the same.\n\nV.dynamic.out\n        Reconstructed  free energy surface F(s)  during metadynamics run. It\n        is  very useful to  decide where  to stop  the  runs for getting the\n        final free energy  surface, and to  observe the way  the free energy\n        surface builds  up during  the  dynamics.  Units of free   energy is\n        according to the keyword UNITS (see above). IF OUT GRID is used, the\n        format of printing will be as follows for a 2 CV case:\n\n        grid_x0    grid_y0           F(x0,y0,t)           F(x0,y0,t+n*dt)           F(x0,y0,t+2*n*dt)           ....\n        grid_x0    grid_y0+dy        F(x0,y0+dy,t)        F(x0,y0+dy,t+n*dt)        F(x0,y0+dy,t+2*n*dt)        ....\n        .......\n        grid_x0    grid_y0+(Ny-1)*dy F(x0,y0+(Ny-1)*dy,t) F(x0,y0+(Ny-1)*dy,t+n*dt) F(x0,y0+(Ny-1)*dy,t+2*n*dt) ....\n              -blank line-\n        grid_x0+dx grid_y0           F(x0+dx,y0,t)        F(x0+dx,y0,t+n*dt)        F(x0+dx,y0,t+2*n*dt)        ....\n        grid_x0+dx grid_y0+dy        F(x0+dx,y0+dy,t)     F(x0+dx,y0+dy,t+n*dt)     F(x0+dx,y0+dy,t+2*n*dt)     ....\n        .......\n\nV.final.cube\n        Final reconstructed free energy surface in a Gaussian-style cube file.\n\nV.colvar.cube\n        Free energy values along the trajectory of collective variables (read \n        from colvar_mtd file) in a Gaussian-style  cube file\n.\nV.cvmdck.cube\n        Free energy values along the trajectory of collective coordinates (not\n        collective variables)  as in the cvmdck_mtd  file  from  CPMD,  in the\n        Gaussian cube file format.\n\nwalker.out \n        position of the walker (Gaussian centers) and the total potential at\n        this point (read in from 'enevar_mtd') will be written to 'walker.out',\n        in the same format as that of 'V.final.out'.\n\n\n# Manual for mtd_restart_extract.f90 code (Nisanth N. Nair 26/06/08)\n\nThis   code   reads a  'MTD_RESTART'  file   and  recreates the  corresponding\n'colvar_mtd' and 'parvar_mtd' files, which are required for reconstructing the\nfree  energy surface.  Useful,  if the *_mtd files  got corrupted, or to check\nthe biasing hills used in CPMD for actual  calculations.  Output is written to\nthe files 'colvar_mtd.reco' and 'parvar_mtd.reco'.\n\n\nTo compile:\n\n```bash\nmake\n```\n\nTo use:\n\n```bash\n./mtd_restart_extract.x\n```\n\nReads in 'MTD_RESTART' from the working directory and writes out\ncolvar_mtd.reco and parvar_mtd.reco\n\n## Bugs/Comments/Suggestions\nPlease report bugs to nisanth.nair@theochem.rub.de\n\n\n# Credits\nautotools-skeleton (https://github.com/gizero/autotools-skeleton)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnnairiitk%2Fvreco_cpmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnnairiitk%2Fvreco_cpmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnnairiitk%2Fvreco_cpmd/lists"}