File: wrvm.c

package info (click to toggle)
viewmol 2.3-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 9,424 kB
  • ctags: 2,239
  • sloc: ansic: 29,098; sh: 909; makefile: 513; python: 238
file content (47 lines) | stat: -rw-r--r-- 941 bytes parent folder | download
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
/*****
This file is part of the Babel Program
Copyright (C) 1992-96 W. Patrick Walters and Matthew T. Stahl 
All Rights Reserved 
All Rights Reserved 
All Rights Reserved 
All Rights Reserved 

For more information please contact :

babel@mercury.aichem.arizona.edu
--------------------------------------------------------------------------------

FILE : wrvm.c
AUTHOR(S) : Jrg-Rdiger Hill
DATE : 1-99
PURPOSE : Routines to write a Viewmol type file.

******/


#include "bbltyp.h"

int
  write_viewmol(FILE *file1, ums_type *mol)
{
  int i,j;
  char type_name[5];
  int result;

  if (strlen(Title) > 0)
    fprintf(file1,"$title\n%s\n",Title);
  fprintf(file1,"$coord 1.0\n");

  for (i = 1; i <= Atoms; i ++)
  {
    result =  get_output_type(i,"XYZ",Type(i),type_name,all_caps);

    fprintf(file1,"%22.14f%22.14f%22.14f %s\n",
	      X(i),
	      Y(i),
	      Z(i),
	      type_name);
  }
  fprintf(file1,"$end\n");
  return(TRUE);
}