File: filter.py

package info (click to toggle)
python-ase 3.17.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,340 kB
  • sloc: python: 117,348; makefile: 91
file content (13 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Test that the filter and trajectories are playing well together."""

from ase.build import molecule
from ase.constraints import Filter
from ase.optimize import QuasiNewton
from ase.calculators.emt import EMT

atoms = molecule('CO2')
atoms.set_calculator(EMT())
filter = Filter(atoms, indices=[1, 2])

opt = QuasiNewton(filter, trajectory='filter-test.traj', logfile='filter-test.log')
opt.run()