The purpose of StructureFinder is to find crystallograpgic files such as Crystallographic Information Files (.cif) and SHELX (.res) files. StructureFinder indexes all .cif and/or .res files below a certain directory(s) and makes them searchable. The intention is not to bring the files in order or have a static database. It only reflects the order on the file system.
|StructureFinder-setup-x64-v70.exe||2022-09-21||Windows 10 and up|
Selecting a certain row of the database shows the unit cell, the residuals and the asymmetric unit.
Basic search options for unit cells and text is also available. The cell search takes six parameters a, b, c, α, β, γ. The search is unsharp so 10 10 10 90 90 90 would find the same cell as 10.00 10.00 10.00 90.00 90.00 90.00.
The tolerances for the cell search are:
volume: ±3 %, length: 0.06 Å, angle: 1.0°
more results option
volume: ±9 %, length: 0.2 Å, angle: 2.0°
The text search field searches in the directory, name and .res file text data. You can concatenate words with ? and *. For example foo*bar means 'foo[any text]bar'.
Pro tip: Double click on the unit cell to copy the cell to the clip board.
The 'all cif values' tab shows all cif values available in the database. These are not necessarily all but most values from the cif file.
The 'Advanced Search' tab allows you to search for several options at a time and also allows to exclude parameters. I will add more options in the future and I am open for suggestions for more search options.
The 'Import Directory' button starts indexing of .cif or .res files below the selected directory recursively, depending on which file ending is enabled. It will scan all subdirectories for .cif/.res files as well as .zip files containing .cif files. The time for indexing mostly depends on the speed of your hard drive. Scanning a complete 256 GB SSD takes about 50s. An eight years old complete file server with over 100 user directories and 20.000 crystal structures can take an hour.
You should not run the import on a network drive. It will take ages!
With the strf_cmd.py script, you can index directories without a graphical user interface.
The options -d and -e can be given multiple times like -d /foo -d /bar.
The command line indexer only needs Python >= 3.6.
$ python3.9 strf_cmd.py usage: strf_cmd.py [-h] [-d "directory"] [-e "directory"] [-o "file name"] Command line version of StructureFinder to collect cif files to a database. StructureFinder will search for cif/res files in the given directory(s) recursively. (Either -c, -r or both options must be active!) optional arguments: -h, --help show this help message and exit -d "directory" Directory(s) where cif files are located. -e "directory" Directory names to be excluded from the file search. Default is: "ROOT", ".OLEX", "TMP", "TEMP", "Papierkorb", "Recycle.Bin" Modifying -e option discards the default. -o "sqlite file name" Name of the output database file. Default: "./structuredb.sqlite" Also used for the commandline search (-f option). -c Add .cif files (crystallographic information file) to the database. -r Add SHELX .res files to the database. --delete Delete and do not append to previous database. -f CELL Search for the specified unit cell. The cell values have to be enclosed in brackets. -m MERGE Merges a database file into the file of '-o' option.
Creates the file structuredb.sqlite in the current directory:
./strf_cmd.bat -d D:\Github\StructureFinder -o test.sqlite -c -r --delete collecting *.cif, *.zip, *.tar.gz, *.tar.bz2, *.tgz, *.res files below . 49 files considered. Added 255 files (251 cif, 4 res) files (212 in compressed files) to database in: 0 h, 0 m, 2.31 s --------------------- Total 255 cif/res files in '/Users/daniel/Documents/GitHub/StructureFinder/test.sqlite'. Duration: 0 h, 0 m, 2.33 s
The command line version always appends all data to an already existing database in the current working directory. It will not append the date with the --delete option.
StructureFinder is able to search for unit cells in the CSD with the CellCheckCSD program. As soon as CellCheckCSD is installed, you can search the CSD. Double-Click on a result row to get the detailed structure page.
Instead of the regular user interface, you can run StructureFinder as web service. First, create a database with ./strf_cmd This can be automated with a cron job to do it regularly. The zip file strf_cmd_version.zip above contains all you need to start the web service or use the Git repository.
The required Python packages can be installed with the 'install_all_requirements' script.
Change the variables
host = "127.0.0.1"
port = "80"
dbfilename = "/path/to/database.sqlite"
in cgi_ui/cgi-bin/strf_web.py to your desired webserver address and database path. Some operating systems do not allow users to run services at port 80. You might use port 8080 instead.
Go into the Structurefinder main directory and run
Be aware that running a web server has security implications. Do not expose this server to the internet unless you know what you are doing!
The web site should look like this after clicking on a table row:
If you want to open the same database file with the Windows version, you can add the database file as command line parameter in the start menu shortcut:
StructureFinder is free software and licensed under the beerware license.