BFEE2.inputGenerator

exception BFEE2.inputGenerator.DirectoryExistError(arg)[source]

Bases: RuntimeError

exception BFEE2.inputGenerator.FileTypeUnknownError(arg)[source]

Bases: RuntimeError

class BFEE2.inputGenerator.inputGenerator[source]

Bases: object

generate all the inputs and define corresponding slots

generateGromacsGeometricFiles(path, topFile, pdbFile, pdbFileFormat, ligandOnlyTopFile, ligandOnlyPdbFile, ligandOnlyPdbFileFormat, selectionPro, selectionLig, selectionSol='resname TIP3* or resname SPC* or resname HOH or resname WAT or resname SOL', temperature=300.0)[source]
generate all the input files for Gromacs Geometric simulation

This function is based on BFEEGromacs.py contributed by Haochuan Chen (yjcoshc_at_mail.nankai.edu.cn)

Parameters:
  • path (str) – the directory for generation of all the files

  • topFile (str) – the path of the topology (top) file

  • pdbFile (str) – the path of the coordinate (pdb) file

  • ligandOnlyTopFile (str) – the path of the ligand-only topology (top) file

  • ligandOnlyPdbFile (str) – the path of the ligand-only coordinate (pdb) file

  • selectionPro (str) – MDAnalysis-style selection of the protein

  • selectionLig (str) – MDAnalysis-style selection of the ligand

  • selectionSol (str, optional) – MDAnalysis-style selection of the solvent. Defaults to ‘resname TIP3* or resname SPC*’.

  • temperature (float, optional) – Temperature of the simulation. Defaults to 300.0.

Raises:

DirectoryExistError – when {path}/BFEE exists

generateNAMDAlchemicalFiles(path, topFile, coorFile, forceFieldType, forceFieldFiles, temperature, selectionPro, selectionLig, stratification=[1, 1, 1, 1], doubleWide=False, minBeforeSample=False, membraneProtein=False, neutralizeLigOnly='NaCl', pinDownPro=True, useOldCv=True, vmdPath='', OPLSMixingRule=False, considerRMSDCV=True, CUDASOAIntegrator=False, timestep=2.0, reEq=False, useLDDM=False, useLambdaABF=False)[source]

generate all the input files for NAMD alchemical simulation

Parameters:
  • path (str) – the directory for generation of all the files

  • topFile (str) – the path of the topology (psf, parm) file

  • coorFile (str) – the path of the coordinate (pdb, rst7) file

  • forceFieldType (str) – ‘charmm’ or ‘amber’

  • forceFieldFiles (list of str) – list of CHARMM force field files

  • temperature (float) – temperature of the simulation

  • selectionPro (str) – MDAnalysis-style selection of the protein

  • selectionLig (str) – MDAnalysis-style selection of the ligand

  • stratification (list of int, 4, optional) – number of windows for each simulation. Defaults to [1,1,1,1].

  • doubleWide (bool, optional) – whether double-wide simulations are carried out. Defaults to False.

  • minBeforeSample (bool, optional) – minimization before sampling in each FEP window. Defaults to False.

  • membraneProtein (bool, optional) – whether simulating a membrane protein. Defaults to False.

  • neutralizeLigOnly (str or None, optional) – ‘NaCl’, ‘KCl’, ‘CaCl2’ or None. neutralize the lig-only system using the salt. Defaluts to NaCl.

  • pinDownPro (bool, optional) – whether pinning down the protien. Defaults to True.

  • useOldCv (bool, optional) – whether used old, custom-function-based cv. Defaults to True.

  • vmdPath (str, optional) – path to vmd. Defaults to ‘’.

  • OPLSMixingRule (bool, optional) – whether use the OPLS mixing rules. Defaults to False.

  • considerRMSDCV (bool, optional) – Whether consider the RMSD CV. Default to True.

  • CUDASOAIntegrator (bool, optional) – Whether CUDASOA integrator is used. Default to False.

  • timestep (float, optional) – timestep of the simulation. Default to 2.0

  • reEq (bool, optional) – re-equilibration after histogram. Default to False.

  • useLDDM (bool, optional) – whether the LDDM strategy is used. Default to False.

  • useLambdaABF (bool, optional) – whether use WTM-lambdaABF instead of FEP. Default to False.

generateNAMDGeometricFiles(path, topFile, coorFile, forceFieldType, forceFieldFiles, temperature, selectionPro, selectionLig, selectionRef='', userProvidedPullingTop='', userProvidedPullingCoor='', stratification=[1, 1, 1, 1, 1, 1, 1, 1], membraneProtein=False, neutralizeLigOnly='NaCl', pinDownPro=True, useOldCv=True, parallelRuns=1, vmdPath='', reflectionBoundary=False, MDEngine='namd', OPLSMixingRule=False, considerRMSDCV=True, GaWTM=False, CUDASOAIntegrator=False, timestep=2.0)[source]

generate all the input files for NAMD geometric simulation

Parameters:
  • path (str) – the directory for generation of all the files

  • topFile (str) – the path of the topology (psf, parm) file

  • coorFile (str) – the path of the coordinate (pdb, rst7) file

  • forceFieldType (str) – ‘charmm’ or ‘amber’

  • forceFieldFiles (list of str) – list of CHARMM force field files

  • temperature (float) – temperature of the simulation

  • selectionPro (str) – MDAnalysis-style selection of the protein

  • selectionLig (str) – MDAnalysis-style selection of the ligand

  • selectionRef (str, optional) – MDAnalysis-style selection of the reference group for pulling simulation, by default, this is the protein. Defaults to ‘’.

  • userProvidedPullingTop (str, optional) – user-provided large solvation box for pulling simulation. Defaults to ‘’.

  • userProvidedPullingCoor (str, optional) – user-provided large solvation box for pulling simulation. Defaults to ‘’.

  • stratification (list, optional) – number of windows for each simulation. Defaults to [1,1,1,1,1,1,1,1].

  • membraneProtein (bool, optional) – whether simulation a membrane protein. Defaults to False.

  • neutralizeLigOnly (str or None, optional) – ‘NaCl’, ‘KCl’, ‘CaCl2’ or None. neutralize the lig-only system using the salt. Defaluts to NaCl.

  • pinDownPro (bool, optional) – whether pinning down the protien. Defaults to True.

  • useOldCv (bool, optional) – whether used old, custom-function-based cv. Defaults to True.

  • parallelRuns (int, optional) – generate files for duplicate runs. Defaults to 1.

  • vmdPath (str, optional) – path to vmd. Defaults to ‘’.

  • reflectingBoundary (bool, optional) – Whether use reflecting boundaries, requires setBoundary on. Default to False.

  • MDEngine (str, optional) – namd or gromacs. Default to namd.

  • OPLSMixingRule (bool, optional) – whether use the OPLS mixing rules. Defaults to False.

  • considerRMSDCV (bool, optional) – Whether consider the RMSD CV. Default to True.

  • GaWTM (bool, optional) – Whether performing GaWTM-eABF simulations. Default to False.

  • CUDASOAIntegrator (bool, optional) – Whether CUDASOA integrator is used. Default to False.

  • timestep (float, optional) – timestep of the simulation. Default to 2.0