# ASEマニュアル

## 行列の固有値

```from LinearAlgebra import Heigenvalues
from Numeric import array
a1 = array([[1.0, 0.01j], [-0.01j, 1.0]])
b1 = Heigenvalues(a1)
print b1```

## 状態密度

```f1 = 'out.nc'

from Dacapo import Dacapo
c1 = s1.GetCalculator()

from ASE.Utilities.DOS import DOS
d1 = DOS(c1)
x0 = d1.GetEnergies()
y1 = d1.GetDOS(0)
y2 = d1.GetDOS(1)

for i in range(len(x0)):
print x0[i], y1[i], -y2[i]```

## 標準ツール trajectory2xyz ソースコード

```#!/usr/bin/env python
from optparse import OptionParser

from ASE.IO.xyz import WriteXYZ
from ASE.Trajectories.NetCDFTrajectory import NetCDFTrajectory

parser = OptionParser(usage='%prog [-r R1 R2 R3] trajectory xyzfile',
version='%prog 0.1')
help='Repeat R1, R2, R3 times along the three axes',
metavar='R1 R2 R3')

options, args = parser.parse_args()

if len(args) != 2:
parser.print_help()
raise SystemExit

print 'Creating xyz file:' ,args[1]
trajectory = NetCDFTrajectory(args[0])
WriteXYZ(args[1],trajectory=trajectory,repeat=options.repeat,id=args[0])```

## VTK (Visual Tool Kit)

```f1 = 'out.nc'

from Dacapo import Dacapo

from ASE.Visualization.VTK import VTKPlotAtoms
ap1 = VTKPlotAtoms(s1)```
```f1 = 'out.nc'

from Dacapo import Dacapo
```f1 = 'out.nc'