1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#!/bin/sh
#!perl -w # --*- Perl -*--
eval 'exec perl -x $0 ${1+"$@"}'
if 0;
#------------------------------------------------------------------------------
#$Author: antanas $
#$Date: 2017-05-17 17:28:57 +0300 (Tr, 17 geg. 2017) $
#$Revision: 5269 $
#$URL: svn://www.crystallography.net/cod-tools/tags/v2.3/tools/duplicate_space_groups $
#------------------------------------------------------------------------------
#*
# Find and print out duplicated space group definitions in COD::Spacegroups::Lookup::COD.
#**
use strict;
use warnings;
use COD::Spacegroups::Lookup::COD;
use COD::Spacegroups::Lookup qw( make_symop_hash make_symop_key );
# Identify the spacegroup from the symmetry operators:
my %symop_lookup_table = make_symop_hash( [
\@COD::Spacegroups::Lookup::COD::table,
\@COD::Spacegroups::Lookup::COD::extra_settings
] );
for my $sg ( @COD::Spacegroups::Lookup::COD::table,
@COD::Spacegroups::Lookup::COD::extra_settings ) {
my @symops = @{$sg->{symops}};
my $key = make_symop_key( \@symops );
if( exists $symop_lookup_table{$key} ) {
my $estimated_sg = $symop_lookup_table{$key};
if( $sg->{universal_h_m} ne $estimated_sg->{universal_h_m} ) {
printf "%-20s\t%s\n",
$sg->{universal_h_m},
$estimated_sg->{universal_h_m};
}
} else {
print STDERR "$0:: WARNING, space group could not be identified\n"
}
}
|