From ce2be5a13ff2ad07f3a5c803a77dc6d9dae186c4 Mon Sep 17 00:00:00 2001 From: Ching Ting LEUNG <147067583+ting2025@users.noreply.github.com> Date: Mon, 6 Apr 2026 14:02:30 -0400 Subject: [PATCH 1/6] Add files via upload --- requirements.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4a50236 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +cirpy==1.0.2 +gpflow==2.10.0 +matplotlib==3.10.8 +numpy==1.26.4 +pandas==2.3.3 +pubchempy==1.0.5 +rdkit==2026.3.1 +scikit_learn==1.7.2 +tqdm==4.67.3 \ No newline at end of file From 3f5586b8ec7caffd494cc3b108f7bc06f003553b Mon Sep 17 00:00:00 2001 From: Ching Ting LEUNG <147067583+ting2025@users.noreply.github.com> Date: Mon, 6 Apr 2026 14:04:17 -0400 Subject: [PATCH 2/6] Update installation instructions in README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c6b49fb..e591ec3 100644 --- a/README.md +++ b/README.md @@ -35,18 +35,18 @@ Then, you can run the installation tests (will run a sigma profile generation jo These instructions are for the case where the user has an existing NWChem installation (has to be at least version `7.2.0` or higher) or a the user would like to install NWChem with specific build instructions (the basic build is sufficient for this package). 1. Install the open source DFT package `NWChem` without Python support (note the compatible versions listed below). -1. Add the path of the `nwchem` executable to your `PATH` variable (the `nwchem` executable path should be along the lines of: `User/Desktop/nwchem-7.2.0-beta2/bin/LINUX64`) -1. Download the current repository to your local machine. -1. Add the path of the folder containing main python script (`/Python`) to your `PATH` variable. -1. Create a conda environment where you can install `rdkit` and its dependencies from the provided `yml` file using the following instructions: +2. Add the path of the `nwchem` executable to your `PATH` variable (the `nwchem` executable path should be along the lines of: `User/Desktop/nwchem-7.2.0-beta2/bin/LINUX64`) +3. Download the current repository to your local machine. +4. Add the path of the folder containing main python script (`/Python`) to your `PATH` variable. +5. Create a conda environment where you can install `rdkit` and its dependencies from the provided `yml` file using the following instructions: ``` # Go to the directory where the repository was installed cd - cd Python - # Create a conda environment for all the dependencies - conda env create -n spg-env --file spg.yml + conda create -n spgen python=3.10 + pip install -r requirements.txt ``` -1. Run the installation tests (will run a sigma profile generation job for methane with different inputs - a SMILES, a CAS number and a pre-optimized xyz). *You may need to edit the environment section of the script before running tests.* + and accept all prompts in the terminal +6. Run the installation tests (will run a sigma profile generation job for methane with different inputs - a SMILES, a CAS number and a pre-optimized xyz). *You may need to edit the environment section of the script before running tests.* ``` ./run-tests.sh ``` From 5b51b7a2b22e5de9347e0cf8c25b49a4f8efd5c7 Mon Sep 17 00:00:00 2001 From: Ching Ting LEUNG <147067583+ting2025@users.noreply.github.com> Date: Mon, 6 Apr 2026 14:06:27 -0400 Subject: [PATCH 3/6] Revise conda environment setup in README Updated conda environment creation instructions and added package installation steps. --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e591ec3..fa8fb90 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,10 @@ These instructions are for a user who would like all functionalities to be prese ``` # Go to the directory where the repository was installed cd - cd Python - # Create a conda environment for all the dependencies - conda env create -n spg-env --file spg-7.3.yml + # Create conda environment with for OpenSPGen + conda create -n spgen python=3.10 + # Install required packages + pip install -r requirements.txt ``` Then, you can run the installation tests (will run a sigma profile generation job for methane with different inputs - a SMILES, a CAS number and a pre-optimized xyz). *You may need to edit the environment section of the script before running tests.* ``` @@ -41,8 +42,11 @@ These instructions are for the case where the user has an existing NWChem instal 5. Create a conda environment where you can install `rdkit` and its dependencies from the provided `yml` file using the following instructions: ``` # Go to the directory where the repository was installed + # Go to the directory where the repository was installed cd + # Create conda environment with for OpenSPGen conda create -n spgen python=3.10 + # Install required packages pip install -r requirements.txt ``` and accept all prompts in the terminal From 5a23cc4dd0fe7afe8161d3cb8150a0ff5a8f0e85 Mon Sep 17 00:00:00 2001 From: Ching Ting LEUNG <147067583+ting2025@users.noreply.github.com> Date: Wed, 8 Apr 2026 11:49:25 -0400 Subject: [PATCH 4/6] Update package versions in requirements.txt Updated pandas and rdkit versions in requirements.txt. --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4a50236..e3df03a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ cirpy==1.0.2 gpflow==2.10.0 matplotlib==3.10.8 numpy==1.26.4 -pandas==2.3.3 +pandas==2.1.1 pubchempy==1.0.5 -rdkit==2026.3.1 +rdkit==2022.03.5 scikit_learn==1.7.2 -tqdm==4.67.3 \ No newline at end of file +tqdm==4.67.3 From 5cf2010a7d4aabc0301227ed7f46e749a0f24649 Mon Sep 17 00:00:00 2001 From: Ching Ting LEUNG <147067583+ting2025@users.noreply.github.com> Date: Wed, 8 Apr 2026 11:56:30 -0400 Subject: [PATCH 5/6] Revise conda environment setup instructions in README Updated instructions for creating a conda environment and running tests. --- README.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fa8fb90..ca823ff 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,17 @@ The journal article associated with this work is available on DigitalDiscovery:[ These instructions are for a user who would like all functionalities to be present within the same conda environment. Here, NWChem along with the necessary python dependencies are installed through conda from an environment file using the following instructions: ``` - # Go to the directory where the repository was installed cd - # Create conda environment with for OpenSPGen + # Create a conda environment for all the dependencies + conda env create -n spg-env --file Python/spg-7.3.yml + ``` + Installing with the .yml file is preferred for reproducibility of results. If it failed on your device, linux dependencies could be excluded by replacing the line of conda environment creation with the following block: + ``` conda create -n spgen python=3.10 # Install required packages pip install -r requirements.txt ``` + and accept all prompts in the terminal Then, you can run the installation tests (will run a sigma profile generation job for methane with different inputs - a SMILES, a CAS number and a pre-optimized xyz). *You may need to edit the environment section of the script before running tests.* ``` ./run-tests.sh @@ -40,17 +44,20 @@ These instructions are for the case where the user has an existing NWChem instal 3. Download the current repository to your local machine. 4. Add the path of the folder containing main python script (`/Python`) to your `PATH` variable. 5. Create a conda environment where you can install `rdkit` and its dependencies from the provided `yml` file using the following instructions: + ``` - # Go to the directory where the repository was installed - # Go to the directory where the repository was installed cd - # Create conda environment with for OpenSPGen + # Create a conda environment for all the dependencies + conda env create -n spg-env --file Python/spg-7.3.yml + ``` + Installing with the .yml file is preferred for reproducibility of results. If it failed on your device, linux dependencies could be excluded by replacing the line of conda environment creation with the following block: + ``` conda create -n spgen python=3.10 # Install required packages pip install -r requirements.txt ``` - and accept all prompts in the terminal -6. Run the installation tests (will run a sigma profile generation job for methane with different inputs - a SMILES, a CAS number and a pre-optimized xyz). *You may need to edit the environment section of the script before running tests.* + and accept all prompts in the terminal. +7. Run the installation tests (will run a sigma profile generation job for methane with different inputs - a SMILES, a CAS number and a pre-optimized xyz). *You may need to edit the environment section of the script before running tests.* ``` ./run-tests.sh ``` From c9c0342453258267d710cd0184723d31b61ea4bd Mon Sep 17 00:00:00 2001 From: Ching Ting Leung Date: Thu, 9 Apr 2026 10:35:03 -0400 Subject: [PATCH 6/6] NWCheem_wrapper maintainance --- Python/lib/NWChem_Wrapper.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Python/lib/NWChem_Wrapper.py b/Python/lib/NWChem_Wrapper.py index aec2907..f8cdc3f 100644 --- a/Python/lib/NWChem_Wrapper.py +++ b/Python/lib/NWChem_Wrapper.py @@ -22,8 +22,8 @@ . goToLine() . findNextOccurrence() -Last edit: 2025-01-29 -Author: Dinis Abranches, Fathya Salih +Last edit: 2026-04-09 +Author: Dinis Abranches, Fathya Salih, Ching Ting Leung """ # ============================================================================= @@ -208,15 +208,18 @@ def readOutput(outputPath,doCOSMO=True): with open(outputPath,'r') as file: if doCOSMO: # Find last occurrence of "-cosmo- solvent" - lastOccurrenceLine=findLastOccurrence(file,['-cosmo-','solvent']) - # Go to line of last occurrence - goToLine(file,lastOccurrenceLine) - # Retrieve total number of surface segments - lineSplit=findNextOccurrence(file,'-cosmo-') - nSeg=int(lineSplit[-1]) - # Retrieve total surface area (next line) - lineSplit=file.readline().split() - surfaceArea=float(lineSplit[-2]) + file.seek(0) + cosmoLineNum = None + for i, line in enumerate(file): + if '-cosmo-' in line and 'points' in line: + cosmoLineNum = i + file.seek(0) + for _ in range(cosmoLineNum): + file.readline() + lineSplit = file.readline().split() + nSeg = int(lineSplit[-1]) + lineSplit = file.readline().split() + surfaceArea = float(lineSplit[-2]) # Initialize list of areas and segment atoms segmentAreas=[] segAtoms=[]