ase merge requestshttps://staging.gitlab.com/ase/ase/-/merge_requests2017-04-27T10:30:30Zhttps://staging.gitlab.com/ase/ase/-/merge_requests/492BUG: fix bug in read_vasp_out()2017-04-27T10:30:30Zusername-removed-131198BUG: fix bug in read_vasp_out()Fix error in ase/io/vasp.py:read_vasp_out(), by moving the set_calculator() call outside of the loop over atomsFix error in ase/io/vasp.py:read_vasp_out(), by moving the set_calculator() call outside of the loop over atomshttps://staging.gitlab.com/ase/ase/-/merge_requests/491BUG: Move set_calculator() call out of loop over atoms2017-04-27T10:20:25Zusername-removed-131198BUG: Move set_calculator() call out of loop over atomsThis MR fixes a small bug in ase/io/vasp.py in read_vasp_out(), to move the set_calculator outside of the loop over atoms.This MR fixes a small bug in ase/io/vasp.py in read_vasp_out(), to move the set_calculator outside of the loop over atoms.https://staging.gitlab.com/ase/ase/-/merge_requests/381Make phonons able to use initial magnetic moments of atoms2017-04-19T13:01:06Zusername-removed-735760Make phonons able to use initial magnetic moments of atomsThe option ``use_initial_magmom'' has been added to the phonon calculator.
Enabling this will start the phonon calculations with the initial magnetic
moments of the atoms in the supercell the same as the corresponding atoms in
the primit...The option ``use_initial_magmom'' has been added to the phonon calculator.
Enabling this will start the phonon calculations with the initial magnetic
moments of the atoms in the supercell the same as the corresponding atoms in
the primitive cell.https://staging.gitlab.com/ase/ase/-/merge_requests/476Last problem fixed with translation functions, confirmed to work.2017-04-11T21:15:31Zusername-removed-263547Last problem fixed with translation functions, confirmed to work.@askhl Last fix, I am at least 5% sure. Translational functions complicate things.@askhl Last fix, I am at least 5% sure. Translational functions complicate things.username-removed-71312asklarsen@gmail.comusername-removed-71312asklarsen@gmail.comhttps://staging.gitlab.com/ase/ase/-/merge_requests/451WIP: New webinterface2017-04-03T13:11:33Zusername-removed-1167709WIP: New webinterfacehttps://staging.gitlab.com/ase/ase/-/merge_requests/452WIP: One command line tool "ase" to replace all the other ones ("ase-gui", "a...2017-03-21T12:23:14Zusername-removed-71423WIP: One command line tool "ase" to replace all the other ones ("ase-gui", "ase-db", ...)https://staging.gitlab.com/ase/ase/-/merge_requests/448ase.db metadata2017-03-21T12:05:02Zusername-removed-71423ase.db metadatahttps://staging.gitlab.com/ase/ase/-/merge_requests/443Added the capability in i/o to read the dipole moment from vasprun.xml if it ...2017-03-09T18:10:06Zusername-removed-1159592Added the capability in i/o to read the dipole moment from vasprun.xml if it existsVery minor code changes so that dipole moment can be read from vasprun.xml.
try:
lastdipole = step.findall('scstep/dipole')[-1]
except:
lastdipole = None
dipole = None
if lastdipole is not None:
...Very minor code changes so that dipole moment can be read from vasprun.xml.
try:
lastdipole = step.findall('scstep/dipole')[-1]
except:
lastdipole = None
dipole = None
if lastdipole is not None:
dblock = lastdipole.find('v[@name="dipole"]')
if dblock is not None:
dipole = np.zeros((1,3), dtype=float)
dipole = np.array([float(val) for val in dblock.text.split()])https://staging.gitlab.com/ase/ase/-/merge_requests/442Modify vibrations py2017-03-09T15:58:15Zusername-removed-1159592Modify vibrations pyThis branch contains modifications to the vibrations.py and infrared.py files. Current users will be unaffected but it allows vibrations frequencies, modes, and infrared intensities to be determined directly from a list of atoms objects ...This branch contains modifications to the vibrations.py and infrared.py files. Current users will be unaffected but it allows vibrations frequencies, modes, and infrared intensities to be determined directly from a list of atoms objects generated from a previous vibrational calculation. This would be the case if a vasprun.xml file was read in after a vibrational calculation was run in Vasp. Below is an example of how it could be used.
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 25 14:20:17 2016
@author: lansford
"""
import numpy as np
import os
from ase.io import read
from ase.vibrations import Vibrations
from ase.vibrations import Infrared
"""Getting Frequencies"""
vibration_file = os.path.expanduser('~/C2H4/freq/vasprun.xml')
vaspxml = read(vibration_file,index=':')
vib = Vibrations(vaspxml,delta=0.025, nfree=2)
vib.get_frequencies()
"""Adding dipole moment to each atom object in list vaspxml"""
dipole_file = os.path.expanduser('~/C2H4/dipole.extxyz')
dipoles = read(dipole_file,format='extxyz')
for i in range(0,len(vaspxml)):
vaspxml[i].dipole = dipols[i]
"""Running infrared and getting spectra"""
C2H4 = Infrared(vaspxml,delta=0.025, nfree=2)
C2H4.get_spectrum(start=0,end=3500,width=80, normalize=False)https://staging.gitlab.com/ase/ase/-/merge_requests/437Add vibrations py2017-03-08T20:03:03Zusername-removed-1159592Add vibrations pyThis update to vibrations.py allows vibrations to be calculated directly from an atoms object containing embedded atoms objects. This would be the case if a vasprun.xml file was read after a vibrational calculation in vasp. This will wor...This update to vibrations.py allows vibrations to be calculated directly from an atoms object containing embedded atoms objects. This would be the case if a vasprun.xml file was read after a vibrational calculation in vasp. This will work for all vibrational calculations that worked originally from pickles. There is an addition of an imagetype option which can be either 'pickle' or 'atoms. 'pickle' is the default.https://staging.gitlab.com/ase/ase/-/merge_requests/393Minor improvement: more robust spacegroup datafile reader2017-03-06T22:57:03Zusername-removed-284116Minor improvement: more robust spacegroup datafile readerAllow the spacegroup datafile reader to accept old user-defined spacegroup datafiles with floats written as 0.5000 instead of 1/2.
The motivation is that I wanted to use an old modified copy of the spacegroup datafile with an additiona...Allow the spacegroup datafile reader to accept old user-defined spacegroup datafiles with floats written as 0.5000 instead of 1/2.
The motivation is that I wanted to use an old modified copy of the spacegroup datafile with an additional setting for spacegroup 8.username-removed-71423username-removed-71423https://staging.gitlab.com/ase/ase/-/merge_requests/439Added charges extxyz.py2017-03-06T15:23:37Zusername-removed-1159592Added charges extxyz.pyAdded ability of ase.io.read('extended xyz') to read charges. Simply added the following lines.
charges = None
if 'charges' in arrays:
charges = arrays['charges']
del arrays['charges']Added ability of ase.io.read('extended xyz') to read charges. Simply added the following lines.
charges = None
if 'charges' in arrays:
charges = arrays['charges']
del arrays['charges']https://staging.gitlab.com/ase/ase/-/merge_requests/391Adding the TIP4P force field for water to ASE, compatible with the QM/MM module2017-03-01T10:21:10Zusername-removed-559845Adding the TIP4P force field for water to ASE, compatible with the QM/MM moduleSince some users are employing this force field for QM/MM simulations, I've implemented a version that works with the official, updated QM/MM scheme. Info on the FF: http://dx.doi.org/10.1063/1.445869
TIP4P uses a virtual interaction s...Since some users are employing this force field for QM/MM simulations, I've implemented a version that works with the official, updated QM/MM scheme. Info on the FF: http://dx.doi.org/10.1063/1.445869
TIP4P uses a virtual interaction site on every water molecule that carries the charge, which makes the model reproduce liquid water quasistructure more accurately. We've tested that the previous implementation produced liquid TIP4P water, so for this version, I've tested that the energies and forces are consistent with the previous version, and with TIP4P forces from the NAMD MD program.
Having massless, virtual interaction sites while avoiding having to change all dynamics codes and constraints to be able to handle this means only adding the sites just before the energy/forces are calculated, and removing them again after the forces on the sites have been redistributed (according to 10.1002/(SICI)1096-987X(199906)20:8). However, this means that for the QM/MM electrostatic embedding to work, the virtual sites must also be added when the embedding takes place. Thus, I've made a new embedding class, EmbedTIP4P, that does this.
These tests are made on the water dimer.
MM Forces:
![forces](/uploads/2e33ab92a3626362408deed46e87ba19/forces.png)
This plot shows the force components of the left (blue) and right (red) water molecule in the dimer. The previous (old) implementation and the current (circles) give the same results. Both versions are consistent with NAMD.
MM dimer binding energy:
![epotMM](/uploads/8df582d7cb8eea763024f754c18adf55/epotMM.png)
MM, QM/MM, and QM energies:
![epot](/uploads/6545ade662957122f520cdbab026058c/epot.png)username-removed-71423username-removed-71423https://staging.gitlab.com/ase/ase/-/merge_requests/432ENH: Added function to compute numeric stress.2017-02-28T09:50:09Zusername-removed-151986ENH: Added function to compute numeric stress.https://staging.gitlab.com/ase/ase/-/merge_requests/425Fix inconsistent file mode for potcar writing in vasp2017-02-27T10:06:08Zusername-removed-431132Fix inconsistent file mode for potcar writing in vaspThis fixes py3 incompatibility in write_potcar arising from inconsistent file open mode for reading and writing.
Since the function really copies the contents of the file there is no reason to not using binary mode without any conversion.This fixes py3 incompatibility in write_potcar arising from inconsistent file open mode for reading and writing.
Since the function really copies the contents of the file there is no reason to not using binary mode without any conversion.https://staging.gitlab.com/ase/ase/-/merge_requests/321WIP: atoms.cell has shape nx32017-02-27T02:13:49Zusername-removed-71312asklarsen@gmail.comWIP: atoms.cell has shape nx3cell and pbc now have variable length from 0 to 3, to be able to express systems that are infinite in some directions.cell and pbc now have variable length from 0 to 3, to be able to express systems that are infinite in some directions.https://staging.gitlab.com/ase/ase/-/merge_requests/407fix ulm/numpy/python2 file-object problem2017-02-06T12:32:17Zusername-removed-71312asklarsen@gmail.comfix ulm/numpy/python2 file-object problemworkaround: file obejcts from builtins.open (aka io.open) would not be considered a file by Numpy; hence use the standard python2 open() mechanismworkaround: file obejcts from builtins.open (aka io.open) would not be considered a file by Numpy; hence use the standard python2 open() mechanismhttps://staging.gitlab.com/ase/ase/-/merge_requests/379Additive constraints2017-01-23T17:09:44Zusername-removed-265993Additive constraintsWhen combining Atoms it seems logical to retain their constraints. This preserves the fixed constraints.When combining Atoms it seems logical to retain their constraints. This preserves the fixed constraints.https://staging.gitlab.com/ase/ase/-/merge_requests/380Use initial magnetic moments in phonon calculations2016-12-13T11:24:21Zusername-removed-735760Use initial magnetic moments in phonon calculationsThe option ``use_initial_magmom'' has been added to the phonon calculator.
Enabling this will start the phonon calculations with the initial magnetic
moments in the supercell the same as the corresponding atoms in the ground state
calcul...The option ``use_initial_magmom'' has been added to the phonon calculator.
Enabling this will start the phonon calculations with the initial magnetic
moments in the supercell the same as the corresponding atoms in the ground state
calculation.https://staging.gitlab.com/ase/ase/-/merge_requests/353WIP: General, rigid simple-point charge non-covalent interaction potential2016-11-25T09:49:43Zusername-removed-559845WIP: General, rigid simple-point charge non-covalent interaction potentialWrote an n-point non-covalent interaction potential, RSPC, based on a generalisation of tip3p.py (with LJ-inspiration from qmmm.py).
All intramolecular distances needs to be fixed using the RATTLE-implementation "FixBondLengths" from co...Wrote an n-point non-covalent interaction potential, RSPC, based on a generalisation of tip3p.py (with LJ-inspiration from qmmm.py).
All intramolecular distances needs to be fixed using the RATTLE-implementation "FixBondLengths" from constraints.py. Tested to reproduce tip3p energies and forces, if tip3p parameters are used in RSPC.
Differences from tip3p:
tip3p molecule-wise PBCs and cutoff are based on the oxygen positions. RSPC's is based on the center of mass of every molecule
RSPC only warns about violating the MIC-requirement of having a cutoff that is shorter than 1/2 of all box side lengths, compared to tip3p's assertion.
RSPC also warns if no constraints are set.
WIP that is *required* before merging: Cleanup of comments, and maybe a final test with a non-water potential.
WIPS that are on nice-to-have-list:
* [ ] WIP: Add more LJ combining rules
* [ ] WIP: Add counter-ion functionality (needs a further generalisation of the force calculation)
* [ ] WIP: Further functionalize LJ calculation so it can be easily exchanged for potentials using different expressions.