temporary cd into _script_dir to validate relative filepaths correctly
@@ -747,6 +747,8 @@ class ExperimentBuilder(object):
# Initialize and configure database with molecules, solvents and systems
setup_dir = os.path.join(self._options['output_dir'], self._options['setup_dir'])
self._db = pipeline.SetupDatabase(setup_dir=setup_dir)
+ # These sections can contain entries that point to relative file paths
+ with moltools.utils.temporary_cd(self._script_dir):
self._db.molecules = self._validate_molecules(yaml_content.get('molecules', {}))
self._db.solvents = self._validate_solvents(yaml_content.get('solvents', {}))
self._db.systems = self._validate_systems(yaml_content.get('systems', {}))
