File: write.pl

package info (click to toggle)
libstar-parser-perl 0.59-5
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 220 kB
  • sloc: perl: 1,360; makefile: 2
file content (36 lines) | stat: -rwxr-xr-x 749 bytes parent folder | download | duplicates (5)
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
#! /usr/local/bin/perl -w

############################
#                          #
# Script write.pl          #
# Wolfgang Bluhm, SDSC     #
#                          #
############################

#Reads a .cob file (CIF object) and writes it as a CIF file

use STAR::DataBlock;
use STAR::Writer;
use strict;

if ( !$ARGV[0] || !$ARGV[1] ) {
    print "Usage:   write.pl <infile.cob> <outfile.cif>\n";
    exit;
}

my $data = STAR::DataBlock->new($ARGV[0]);
 
STAR::Writer->write_cif( -dataref=>$data,
                         -file=>$ARGV[1]   );

=head1 DESCRIPTION

 Reads in the data structure of a file or dictionary (.cob file), and writes it
 out as a .cif file.

=head1 USAGE

 perl write.pl <data.cob or dict.cob> <outfile.cif>

=cut