xdatbus.fun_mtd =============== .. py:module:: xdatbus.fun_mtd Functions --------- .. autoapisummary:: xdatbus.fun_mtd.fes_1d xdatbus.fun_mtd.fes_2d xdatbus.fun_mtd.fes_3d xdatbus.fun_mtd.hillspot2hills xdatbus.fun_mtd.report_loader xdatbus.fun_mtd.xdc2xtc xdatbus.fun_mtd.reweight xdatbus.fun_mtd.pmf_321 xdatbus.fun_mtd.neb_2d xdatbus.fun_mtd.local_minima Module Contents --------------- .. py:function:: fes_1d(hillspot_path, hills_count, cv_range, resolution=100) Calculate the 1D free energy profile from a HILLSPOT file. Parameters ---------- hillspot_path : str The path of the HILLSPOT file hills_count : int The number of hills to be read cv_range : list The range of the collective variable resolution : int (optional) The resolution of the free energy profile .. py:function:: fes_2d(hillspot_path, hills_count, cv_1_range, cv_2_range, resolution=100) Calculate the 2D free energy profile from a HILLSPOT file. Parameters ---------- hillspot_path : str The path of the HILLSPOT file hills_count : int The number of hills to be read cv_1_range : list The range of the first collective variable cv_2_range : list The range of the second collective variable resolution : int (optional) The resolution of the free energy profile .. py:function:: fes_3d(hillspot_path, hills_count, cv_1_range, cv_2_range, cv_3_range, resolution=100) Calculate the 2D free energy profile from a HILLSPOT file. Parameters ---------- hillspot_path : str The path of the HILLSPOT file hills_count : int The number of hills to be read cv_1_range : list The range of the first collective variable cv_2_range : list The range of the second collective variable cv_3_range : list The range of the third collective variable resolution : int (optional) The resolution of the free energy profile .. py:function:: hillspot2hills(hillspot_dir, hills_dir, cv, height_conversion=1, sigma_conversion=1, del_inter=False) Convert HILLSPOT file to HILLS file Parameters ---------- hillspot_dir : str Path to HILLSPOT file hills_dir : str Path to the directory where the HILLS file will be created cv : str or list Name of the collective variable(s) height_conversion : float(optional) Conversion factor to convert the unit of the height from eV to kJ/mol sigma_conversion : float(optional) Conversion factor to convert the unit of the sigma based on the lattice in Angstrom del_inter : bool(optional) Delete the intermediate files created by this function. .. py:function:: report_loader(aimd_path, load_pre_report=True, load_last_report=False, delete_intermediate_folders=True) Initialize a trajectory writer instance for *filename*. Parameters ---------- aimd_path : str Output filename of the trajectory; the extension determines the format. load_pre_report : bool (optional) If ``True``, the trajectory will contain the previous frames (before the current run) load_last_report : bool (optional) If ``True``, the trajectory will contain the last frame delete_intermediate_folders : bool (optional) If ``True``, the intermediate folders will be deleted .. py:function:: xdc2xtc(xdc_path) Convert a VASP XDATCAR file to an XTC trajectory file. Parameters ---------- xdc_path : str Path to the XDATCAR file .. py:function:: reweight(fes, cv, nv, kb, t, grid_min, grid_max, grid_num) Reweight a metadynamics simulation to the unbiased ensemble using histogram reweighting. In many cases you might decide which variable should be analyzed after having performed a metadynamics simulation. For example, you might want to calculate the free energy as a function of CVs other than those biased during the metadynamics simulation. At variance with standard MD simulations, you cannot simply calculate histograms of other variables directly from your metadynamics trajectory, because the presence of the metadynamics bias potential has altered the statistical weight of each frame. To remove the effect of this bias and thus be able to calculate properties of the system in the unbiased ensemble, you must reweight (unbias) your simulation. Parameters ---------- fes : np.ndarray The free energy surface calculated from the metadynamics simulation. cv : np.ndarray The collective variable used in the metadynamics simulation. nv : np.ndarray The new collective variable for which the potential of mean force will be calculated. kb : float The Boltzmann constant. t : float The temperature of the simulation. grid_min : float The minimum value of the collective variable. grid_max : float The maximum value of the collective variable. grid_num : int The number of bins in the histogram. Returns ------- np.ndarray The unbiased free energy surface. .. py:function:: pmf_321(fes3d, axis1, axis2) project 3d free energy surface to 1d Parameters ---------- fes3d : np.ndarray The 3d free energy surface. axis1 : int The axis to be projected. axis2 : int The axis to be projected. Returns ------- np.ndarray The 2d free energy surface. .. py:function:: neb_2d(fes, minima_1, minima_2, n_images, n_steps, spring_constant) .. py:function:: local_minima(data, size=3)