Users, There have been several instances of Artemis users asking Bruce for the ability to input CIF crystallographic files directly into Artemis. In my attempt to learn Perl and produce something of value to more than one person, I wrote a program that converts CIF crystallographic files into Atoms.inp files. Bruce may implement this sometime directly into Artemis, but in the meantime I will offer the standalone, command-line conversion program to anyone who can use it. Attached is a zip file with my first version of the Perl CIF->atoms.inp file converter. The main program was snarfed from Bruce's amc2inp.pl program which converts mineral files to atoms input files. cif2inp.pl ---main Perl program. Converts .CIF files to atoms.inp file usage: perl cif2inp.pl aucl.cif parser.pm ---parser module written by Wolfgang Bluhm of PDB at UCSD, parses CIF file into an array of hash arrays. This should be put into the STAR:: subdirectory in the perl library directory. datablock.pm ---reads the hash dictionary.pm ---dictionary of CIF terms (not used) AuCl.cif ---example CIF file from ICSD database with two records in it. The converter currently imports a single CIF file (which may have multiple CIF records) located in the \CIF directory and outputs a *.inp file for each CIF record into the \inp directory. This program has been tested with hundreds of CIF files from the ICSD and CSD databases. I cannot claim if they will work with CIFs from other sources, but I attempted to trap as many errors as I could. This program could easily be expanded to work on multiple CIF files (similar to amc2inp.pl) or...preferably....included directly in Artemis and/or ATOMS as a direct CIF file importer into these programs. I am sure there are many people that would benefit from the ability to directly open CIF files in ATOMS/Artemis and not have to worry about running a standalone application to convert their CIF files to atoms.inp files. Feel free to use any of the code that I have attached. The parser.pm and datablock.pm modules are copyrighted by UCSD (http://pdb.sdsc.edu/STAR/) but they are given aw! ay free for any non-commercial use
participants (1)
-
Barton, David (DG)