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 43 44 45 46 47 48 49
|
#! /bin/sh
#!perl -w # --*- Perl -*--
eval 'exec perl -x $0 ${1+"$@"}'
if 0;
#------------------------------------------------------------------------------
#$Author: antanas $
#$Date: 2021-04-28 19:35:53 +0300 (Wed, 28 Apr 2021) $
#$Revision: 8738 $
#$URL: svn+ssh://www.crystallography.net/home/coder/svn-repositories/cod-tools/tags/v3.7.0/scripts/ssg_symop_check $
#------------------------------------------------------------------------------
#*
#* Check superspace group symmetry operator syntax.
#*
#* USAGE:
#* $0 < input.symop
#* $0 input.symop
#* $0 input1.symop input*.symop
#**
use strict;
use warnings;
use COD::SOptions qw( getOptions );
use COD::SUsage qw( usage );
use COD::Spacegroups::Symop::SSGParse qw( check_symmetry_operator );
use COD::ToolsVersion qw( get_version_string );
#* OPTIONS:
#* --help, --usage
#* Output a short usage message (this message) and exit.
#* --version
#* Output version information and exit.
#**
@ARGV = getOptions(
'--help,--usage' => sub { usage; exit },
'--version' => sub { print get_version_string(), "\n"; exit }
);
while(<>) {
next if /^#/;
next if /^\s*$/;
chomp;
print "\n# $_\n";
my $message;
if( ($message = check_symmetry_operator( $_ )) ) {
print $message, "\n";
} else {
print "OK\n";
}
}
|