Description | Perl tools for X-ray Absorption Spectroscopy |
Demeter::Atoms::Cif - Methods for importing data from Crystallographic Information Files
This documentation refers to Demeter version 0.9.26.
This role allows data from a CIF file to be imported into a Demeter::Atoms object.
read_cif
Read a record from a CIF file.
my $atoms = Demeter::Atoms->new;
$atoms->file("my_structure.cif");
$atoms->record(2);
This example reads the second record from the given CIF file. If the record is not specified, the first record in the file will be imported. That means that the correct thing is done in the case of a single-record CIF file.
Note that a CIF file has no concept of a central atom in the XAS sense. The default behavior is to select the heaviest atom as the central atom.
open_cif
Open a CIF file and return a list of identifiers of the structures in that file.
my @records = $atoms->open_cif;
print join($/, @records), $/;
==prints==>
Gold Chloride
Gold(III) Chloride
In a GUI, this could be used to present a dialog to the user for selecting the correct record from the CIF file.
This only reads the part of the CIF file that Demeter::Atoms uses. All other information in the CIF file is ignored.
Please report problems to the Ifeffit Mailing List (http://cars9.uchicago.edu/mailman/listinfo/ifeffit/)
Patches are welcome.
Bruce Ravel, http://bruceravel.github.io/home
http://bruceravel.github.io/demeter/
Copyright (c) 2006-2018 Bruce Ravel (http://bruceravel.github.io/home). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlgpl.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.