Skip to content

alejandrosantanabonilla/pysoftk

Repository files navigation

PySoftK testing Coverage

Coverage Report
FileStmtsMissCoverMissing
/home/runner/.local/lib/python3.9/site-packages/pysoftk/folder_manager
   folder_creator.py51492%38, 135, 157–158
/home/runner/.local/lib/python3.9/site-packages/pysoftk/format_printers
   format_mol.py651971%59–60, 87–92, 116–121, 145–149, 156–157
/home/runner/.local/lib/python3.9/site-packages/pysoftk/htp_tools
   calculator_htp.py521375%144–169, 244–250
/home/runner/.local/lib/python3.9/site-packages/pysoftk/linear_polymer
   super_monomer.py51786%148–156
/home/runner/.local/lib/python3.9/site-packages/pysoftk/tools
   utils_rdkit.py60985%44, 90, 146–148, 172–180
/home/runner/.local/lib/python3.9/site-packages/pysoftk/topologies
   branched.py40198%120
   diblock.py55198%186
   ranpol.py751087%97, 106, 126, 182, 188, 195–199, 213, 223
/home/runner/.local/lib/python3.9/site-packages/pysoftk/torsional
   torsional.py881089%49–50, 226–237
TOTAL7807491% 

Tests Skipped Failures Errors Time
72 0 💤 0 ❌ 0 🔥 17m 13s ⏱️

PySoftK is a set of Python tools and programs for modelling and simulating polymers with different topologies. The program is still under active development and contributions are welcome. A complete introduction into the program can be found in this link Documentation.

Windows users:

Please take a note that PySCF doesn't support windows OS and therefore you should comment that package in the setup.py file if you would like to install PySoftK in Windows.

Pip installation

To quickly install PySoftk, we encourage to do it inside a virtual environment, which can be achieved in the following way:

  1. Create a directory named as you want and access it (in this case called work_pol):
  [~] mkdir work_pol
  [~] cd work_pol
  1. Create a virtual environment named pol (this name can be changed, of course) and activate the environment:
   [~] python -m venv pol
   [~] source pol/bin/activate
  1. Get PySoftK from the GitHub repository:
  git clone https://github.com/alejandrosantanabonilla/pysoftk.git
  1. Install PySoftK in this folder using the virtual environment
   [~] cd pysoftk
   [~] pip install .

NOTE: To use the calculators option, the code xtb needs to be installed and linked to the executable using the command:

   export PATH="$PATH:$HOME/PATH_TO_FOLDER/xtb-X.X.X/bin"
   export XTBHOME="PATH_TO_XTB_FOLDER/xtb-X.X.X"
   ulimit -s unlimited

Conda installation

These are instructions to

  1. It is recommended to create a new virtual environment in which the PySoftK dependencies can be installed, for example
   conda create --name pysoftk_env
   conda activate pysoftk_env
  1. Make a directory to download PySoftK and change to this directory
   (pysoftk_env) mkdir pysoftk_dir
   (pysoftk_env) cd pysoftk_dir
  1. Download PySoftK from Github
   (pysoftk_env) git clone https://github.com/alejandrosantanabonilla/pysoftk.git
  1. Install xtb using conda
   conda install -c conda-forge xtb
  1. Install MDAnalysis using conda
   conda install -c conda-forge mdanalysis
  1. Install PySoftK and its dependencies as required
   (pysoftk_env) cd pysoftk
   (pysoftk_env) pip install .
  1. You may need to add the PySoftK installation directory to your .bashrc or .zshrc file
    PATH=$PATH:/<path to>/pysoftk_dir	

That's it, you're ready to use PySoftK (remember to activate pysoftk_env!)

Replacing PATH_TO_FOLDER by the actual path where xtb is stored in your computer.

Testing your installation:

  1. To test PySoftK, navigate to the folders test_pysoftk and test_pol inside the test folder. Then, run the following command:
  pytest -v

Contributors:

  • Chris Lorenz (Polymer topologies and documentation)
  • Rob Zioelek (Analysis tools and pysoftwhere developer utils)
  • Raquel Lopez-Rios de Castro (Analysis tools main contributor, documentation)
  • Alejandro Santana-Bonilla (Polymer topologies, utilities and mantaining)