Solution for Using Structure Harvester on the Command Line (Mac)

117 views
Skip to first unread message

Jocelyn Holt

unread,
Oct 24, 2024, 3:17:09 PM10/24/24
to structure-software
Hello All,

I also noticed that the online Structure Harvester program was down and I needed to obtain delta K values for some data. I did some troubleshooting to get Structure Harvester to work on the command line of a Mac and getting Python to run. My experience with Python is limited to using Python launcher, so take this as an inelegant solution.

How to use Structure Harvester on the Command Line; on a Mac

Make sure you have python installed, or download a version appropriate for either mac or pc: https://www.python.org/downloads/

Then download the structure harvester zip file from the web then unzip: https://alumni.soe.ucsc.edu/~dearl/software/structureHarvester/
It can also be downloaded from github by hovering over the green code button and selecting Download Zip, then unzip: https://github.com/dentearl/structureHarvester

#for use in terminal
#first make a copy of the python folder, which is likely in your applications or downloads, and place it on the desktop
#then put the file contents, really need the .py scripts, of structure harvester folder in this python2copy directory (harvesterCore.py, structureHarvester.py)
#now make a new folder inside python2copy called input
#now make a new folder inside python2copy called output
#transfer all the _f files from your structure runs into the input directory
#cd into the python2copy directory#:  
cd /Users/Jocelyn/Desktop/python2copy  
#you can also drag and drop the folder to your terminal, make sure there is a cd before the file path
#now on the command line type the template code and modify with your relevant file paths#: python filepath/structureHarvester.py --dir=/path_to_directory/ --out=/path_to_directory/ --evanno --clumpp_

#This code will take files from the input folder and put results in the output folder note the following command is continuous on one line#: 
python /Users/Jocelyn/Desktop/python2copy/structureHarvester.py --dir=/Users/Jocelyn/Desktop/python2copy/input --out=/Users/Jocelyn/Desktop/python2copy/output --evanno --clumpp

#If you receive the message: error unable to locate any _f files, make sure they are not zipped AND the individual _f files are in a subfolder that is the input path, or leave the input path python2copy and put the _f files in this folder #but it will be messy
Reply all
Reply to author
Forward
0 new messages