change NUM_CORES
This commit is contained in:
@@ -9,3 +9,10 @@ micromamba create -n modeller modeller biopython pymol-open-source biopandas req
|
|||||||
```
|
```
|
||||||
|
|
||||||
modeller注册码:`MODELIRANJE``
|
modeller注册码:`MODELIRANJE``
|
||||||
|
|
||||||
|
## test
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cp pdb_test/5isz.pdb pdb_gjm/
|
||||||
|
gmx_mpi pdb2gmx -f 5isz.pdb -o 5isz.gro -ff amber99sb-ildn -water tip3p -ignh -p topol.top
|
||||||
|
```
|
||||||
@@ -108,7 +108,7 @@ class SimulationRunner:
|
|||||||
result = None
|
result = None
|
||||||
# 保留1个核心不使用
|
# 保留1个核心不使用
|
||||||
num_cores = max(1, multiprocessing.cpu_count() - 1) # 避免核心数小于 1
|
num_cores = max(1, multiprocessing.cpu_count() - 1) # 避免核心数小于 1
|
||||||
os.environ['OMP_NUM_THREADS'] = str(num_cores)
|
os.environ['NUM_CORES'] = str(num_cores)
|
||||||
try:
|
try:
|
||||||
env_vars = {
|
env_vars = {
|
||||||
"NAME": self.pdb_file.stem,
|
"NAME": self.pdb_file.stem,
|
||||||
@@ -196,9 +196,9 @@ def main(simulation_steps, time_step, pdb_folder_path, bash_script_path, gmxrc_p
|
|||||||
pool.join()
|
pool.join()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
NSTEPS = 50000000 # Example: 50000000 steps
|
NSTEPS = 50000 # Example: 50000000 steps
|
||||||
DT = 0.002 # Example: 2 fs time step
|
DT = 0.002 # Example: 2 fs time step
|
||||||
PDB_FOLDER_PATH = Path("./pdb_test") # Assuming the PDB files are in a folder named 'pdb_files' in the current directory
|
PDB_FOLDER_PATH = Path("./pdb_gjm") # Assuming the PDB files are in a folder named 'pdb_files' in the current directory
|
||||||
# 传入自定义的bash脚本路径
|
# 传入自定义的bash脚本路径
|
||||||
CUSTOM_BASH_SCRIPT_PATH = Path('md_gromacs.sh')
|
CUSTOM_BASH_SCRIPT_PATH = Path('md_gromacs.sh')
|
||||||
# 传入 GMXRC 文件的路径
|
# 传入 GMXRC 文件的路径
|
||||||
|
|||||||
Reference in New Issue
Block a user