This file is indexed.

/usr/lib/python2.7/dist-packages/chempy/gms.py is in pymol 1.8.4.0+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific. 
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove this copyright notice.
#F* -------------------------------------------------------------------
#G* Please see the accompanying LICENSE file for further information. 
#H* -------------------------------------------------------------------
#I* Additional authors of this source file include:
#-* 
#-* 
#-*
#Z* -------------------------------------------------------------------

from chempy.models import Indexed
from chempy import Storage,Atom,Bond

#
# THIS MODULE IS OBSOLETE PLEASE DO NOT USE
#

import string

atNum = {
    'H'  : 1,
    'C'  : 6,
    'N'  : 7,
    'O'  : 8,
    'F'  : 9,
    'P'  : 15,
    'S'  : 16,
    'Cl' : 17,
    'Br' : 35,
    'I'  : 53,
    }

class GMS(Storage):

    def toList(self,model,runtyp='OPTIMIZE',exetyp='RUN',
                  gbasis='N31',ngauss=6,ndfunc=1,dirscf=1):

            
        gmsList = []

        # write header records

        nzvar = (model.nAtom*3)-6
        chg = 0
        for a in model.atom:
            chg = chg + a.formal_charge
        chg = int(chg)
        if chg==0:
            icharg=''
            diffsp=''
        else:
            icharg='ICHARG=%d' % chg
            if chg<0:
                diffsp='DIFFSP=.TRUE.'
            else:
                diffsp=''
        gmsList.append(
            " $CONTRL RUNTYP=%s COORD=UNIQUE EXETYP=%s NZVAR=%d %s $END\n" % 
            (runtyp,exetyp,nzvar,icharg))
        if ndfunc>0:
            gmsList.append(" $BASIS GBASIS=%s NGAUSS=%d NDFUNC=%d %s $END\n" %
                                (gbasis,ngauss,ndfunc,diffsp))
        else:
            gmsList.append(" $BASIS GBASIS=%s NGAUSS=%d %s $END\n",
                                (gbasis,ngauss,diffsp))
        if dirscf:
            gmsList.append(" $SCF DIRSCF=.TRUE. $END\n")
        gmsList.append(" $DATA\n")
        gmsList.append(model.molecule.title+" 6-31G* optimization\n")
        gmsList.append("C1\n")

        # write atom records in an ordering compatible with internal
        # coordinate generation
        c = 1
        for z in model.get_internal_tuples():
            a = model.atom[z[0]]
            if not len(a.name):
                name = a.symbol + "%02d"%c
            else:
                name = a.name
            gmsList.append("%4s %5.2f %12.6f %12.6f %12.6f\n" %
                                (name,atNum[a.symbol],a.coord[0],
                                 a.coord[1],a.coord[2]))
            c = c + 1
        gmsList.append(" $END\n")
        gmsList.append(" $ZMAT DLC=.TRUE. AUTO=.TRUE. $END\n")
        if runtyp=='OPTIMIZE':
            gmsList.append(" $STATPT NPRT=-2 NPUN=-2 NSTEP=50 $END\n")
        gmsList.append(" $ELPOT IEPOT=1 WHERE=PDC $END\n")
        gmsList.append(" $PDC PTSEL=GEODESIC CONSTR=CHARGE $END\n")
                            
        return(gmsList)