Skip to content

Commit

Permalink
Hack in relative paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvist committed Nov 14, 2023
1 parent 641ae0a commit bfc63ff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions run_pretrained-Espaloma-0.3.0/run_pretrained.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

# Hello! Many thanks for the reply. I'm trying to build a box of small molecules only. So I've allowed the topology to be the same as my 'molecule'. If there is only one molecule it works (sure) but if it's >1 the problem remains. My .py now looks something like this. My workflow begins with packmol'ing two small molecules and that is the Y6_2_out.mol/.gro

import os
pwd=os.getcwd()

import torch
import espaloma as esp

Expand All @@ -14,8 +19,8 @@
from openff.toolkit.utils.toolkits import RDKitToolkitWrapper

# read in molecules to molecular dynamics
startpositions = GromacsGroFile('/home/hy2120/single-y6/Y6ethyls_pbe0-pvtz.gro').positions
mol_filepath = get_data_file_path('/home/hy2120/single-y6/Y6ethyls_pbe0-pvtz.mol')
startpositions = GromacsGroFile(pwd+'/single-y6/espaloma_on_single_y6/dimer/Y6_2_out.gro').positions
mol_filepath = get_data_file_path(pwd+'/single-y6/espaloma_on_single_y6/dimer/Y6_2_out.mol')

# See here: https://docs.openforcefield.org/projects/toolkit/en/stable/users/molecule_cookbook.html#from-small-molecule-pdb-file
molecule = Molecule.from_file(mol_filepath,"mol", toolkit_registry=RDKitToolkitWrapper())
Expand All @@ -40,3 +45,4 @@
simulation.reporters.append(StateDataReporter(stdout, 1000, step=True,
potentialEnergy=True, temperature=True))
simulation.step(10000)

0 comments on commit bfc63ff

Please sign in to comment.