[ase-users] [gpaw-users] ASE installation for windows

Zahid Hasan missionpagla at gmail.com
Tue Nov 18 14:57:28 CET 2014


Dear all,
Here I am sending the MD file of SiF4 molecule. Although the molecule is
existing in the ase.data.g2 but when I compile the file it shows the
keyerror 'Si'. Can anyone please tell me why it is like that?

Thanks,
Zahid

On Tue, Nov 18, 2014 at 2:01 AM, Zahid Hasan <missionpagla at gmail.com> wrote:

> Dear all,
> Is it possible to calculate the change of atom electron density (wave
> function) with temperature using ASE or GPAW? If yes, is there any relevant
> tutorials for that?
>
> Thanks,
> Zahid
>
> On Sat, Nov 15, 2014 at 11:28 AM, Martin Hangaard Hansen <
> mhah at fysik.dtu.dk> wrote:
>
>>  You should also check the convergence criterion in the calculator if
>> using gpaw for md. Try convergence={'density': 1.0e-5}, It causes drift in
>> temperature if it is not strict enough.
>>
>> Best regards
>> Martin Hangaard
>>
>>
>> ---- Zahid Hasan skrev ----
>>
>>
>>  Thanks.
>>
>> On Fri, Nov 14, 2014 at 2:08 PM, Marcin Dulak <Marcin.Dulak at fysik.dtu.dk>
>> wrote:
>>
>>>  Hi,
>>>
>>> On 11/10/2014 01:11 PM, Zahid Hasan wrote:
>>>
>>> Dear all,
>>> Your feedback helped me to get the things going. Here I am attaching the
>>> python file of molecular dynamics. During the calculation the temperature
>>> change is huge although NVE (Velocity Verlet) method is used. After the
>>> calculation if you see the expansion of the bonds, it seems to be a bit
>>> problematic. So requesting you to look at it to find out whether any reason
>>> behind? May be I am doing something wrong.
>>>
>>> please read https://wiki.fysik.dtu.dk/ase/ase/md.html about choosing
>>> the time step.
>>>
>>> Best regards,
>>>
>>> Marcin
>>>
>>>
>>>  Thank you,
>>> Zahid
>>>
>>>
>>>
>>> On Mon, Nov 10, 2014 at 6:12 AM, Niels Bendtsen Halck <
>>> ntben at fysik.dtu.dk> wrote:
>>>
>>>> Not sure but I don't think molecule sets a cell. Maybe something like
>>>> ch4.center (vacuum=2)
>>>> Ch4-4 = ch4.repeat ((4, 4, 4)).
>>>>
>>>> However md people use more advanced methods for feeling a slab with
>>>> solvent molecules.
>>>>
>>>> Niels Bendtsen Halck
>>>> Ph.d.-studerende
>>>> FYS-CAMD
>>>> DTU Fysik
>>>> Bygning 307
>>>> 2800 Kgs. Lyngby
>>>> Direkte telefon 45253177
>>>> ntben at fysik.dtu.dk
>>>> www.fysik.dtu.dk
>>>> ________________________________________
>>>> Fra: ase-users-bounces at listserv.fysik.dtu.dk [
>>>> ase-users-bounces at listserv.fysik.dtu.dk] p&#229; vegne af Marcin Dulak
>>>> [Marcin.Dulak at fysik.dtu.dk]
>>>> Sendt: 9. november 2014 16:55
>>>> Til: Zahid Hasan
>>>> Cc: ase-users
>>>> Emne: Re: [ase-users] [gpaw-users] ASE installation for windows
>>>>
>>>> Hi,
>>>>
>>>> On 11/09/2014 12:11 AM, Zahid Hasan wrote:
>>>> but when I write
>>>>
>>>> from ase.structures import molecule
>>>> atoms = molecule( 'CH4' )
>>>> multiple = atoms.repeat(4,4,4)
>>>> dyn = VelocityVerlet(multiple, 2*units.fs)
>>>> maybe you need a calculator attached to the atoms.
>>>> Please follow ASE tutorials:
>>>> https://wiki.fysik.dtu.dk/ase/tutorials/tutorials.html
>>>> When reporting problems please provide the full script and verbatim
>>>> error.
>>>>
>>>> Best regards,
>>>>
>>>> Marcin
>>>>
>>>> is something wrong there with the repeat function, as I thought it wiil
>>>> solve multiple unit molecules simultaneously!!
>>>>
>>>> On Sat, Nov 8, 2014 at 11:30 PM, Marcin Dulak <
>>>> Marcin.Dulak at fysik.dtu.dk<mailto:Marcin.Dulak at fysik.dtu.dk>> wrote:
>>>> On 11/08/2014 09:04 PM, Zahid Hasan wrote:
>>>> and I did not understand, "The way different molecule sets are accessed
>>>> in currently not unified in ASE" that you wrote.
>>>> you cannot do for all available modules as you can with tmfp06d:
>>>> from ase.data.tmfp06d import data as tmfp06d
>>>> from ase.structure import molecule
>>>> molecule('ScH', data=tmfp06d)
>>>>
>>>> You need to look into the python files under ase/data, read the code
>>>> what they do,
>>>> if they contain interesting molecules, and how the structures of
>>>> molecules can be accessed.
>>>>
>>>> Best regards,
>>>>
>>>> Marcin
>>>>
>>>>
>>>> On Sat, Nov 8, 2014 at 9:01 PM, Zahid Hasan <missionpagla at gmail.com
>>>> <mailto:missionpagla at gmail.com>> wrote:
>>>> Dear Marcin,
>>>> Thanks a lot. It realy helped me.
>>>>
>>>> And although in VMD the texture is good, but I could not find any
>>>> option to show the bonds and forces between atoms like in ASE GUI. I think
>>>> you have worked a lot with VMD, so definitely you know better whether any
>>>> way exists.
>>>>
>>>> And another question, if I write like,
>>>>
>>>> from ase.structures import molecule
>>>> atoms = molecule( 'CH4' )
>>>> multiple = atoms.repeat(4,4,4)
>>>>
>>>> will the Methane molecule be repeated with relevant covalent bonds in
>>>> three directions of coordinate? And is it also possible in ASE to carry out
>>>> molecular dynamics calculation of available G2 Set molecules?
>>>>
>>>> Thanks,
>>>> Zahid
>>>>
>>>>  On Sat, Nov 8, 2014 at 5:36 PM, Marcin Dulak <
>>>> Marcin.Dulak at fysik.dtu.dk<mailto:Marcin.Dulak at fysik.dtu.dk>> wrote:
>>>> On 11/08/2014 12:02 PM, Zahid Hasan wrote:
>>>> Yes, I have experienced the problem, when tried to convert the
>>>> trajectory file to pdb. The datas are missing there. Unfortunately I could
>>>> not open even the ASE trajectory format in VMD, although VMD accepts
>>>> trajectory input. Is the ASE-trajectory compatible with VMD?
>>>> what is the error message you get when converting with ase-gui?
>>>> VMD does not read traj files.
>>>> This works for me on Windows (with the ASE msi installed after GPAW
>>>> msi):
>>>> from ase.structure import molecule
>>>> from ase.calculators.emt import EMT
>>>> from ase.optimize import QuasiNewton
>>>> m=molecule('H2O')  # H2O from the G2 set
>>>> m.set_calculator(EMT())
>>>> o=QuasiNewton(m, trajectory='m.traj')
>>>> o.run()
>>>> Then, in the command prompt:
>>>> ase-gui m.traj -o m.xyz
>>>>
>>>> And one more question, I wanted to simulate Epoxy molecule with ASE.
>>>> How I can find out which molecules are available in the ASE databank? And
>>>> is there any way to generate the molecule in other software and import in
>>>> ASE for further simulation?
>>>> when molecules are concerned ASE can read xyz, pdb files which you can
>>>> generate in other programs.
>>>>
>>>> You can list the molecule names by accessing the modules located under
>>>> the ase/data directory:
>>>> from ase.data.g2 import data  # this is the G2 set
>>>> print data.keys()
>>>> or
>>>> from ase.data.tmfp06d import data  # doi:10.1063/1.2162161
>>>> print data.keys()
>>>>
>>>> In order to use a set different that G2 (see help for the molecule
>>>> method: python -c "from ase.structure import molecule; help(molecule)"):
>>>> from ase.data.tmfp06d import data as tmfp06d
>>>> from ase.structure import molecule
>>>> molecule('ScH', data=tmfp06d)
>>>>
>>>> The way different molecule sets are accessed in currently not unified
>>>> in ASE - they were
>>>> created ad hoc for the purpose of different projects.
>>>>
>>>> Best regards,
>>>>
>>>> Marcin
>>>>
>>>>
>>>> Thanks and regards,
>>>> Zahid
>>>>
>>>>  On Fri, Nov 7, 2014 at 9:35 AM, Marcin Dulak <
>>>> Marcin.Dulak at fysik.dtu.dk<mailto:Marcin.Dulak at fysik.dtu.dk>> wrote:
>>>> On 11/06/2014 03:35 PM, Zahid Hasan wrote:
>>>> If I save the result file in .pdb format with the commands
>>>>
>>>> dyn = QuasiNewton(slab, trajectory='N2Cu.pdb')
>>>> QuasiNewton trajectory keyword saves a file in trajectory format, no
>>>> matter how you name it.
>>>> You can convert the trajectory file into an xyz (or pdb) with:
>>>> ase-gui -o N2Cu.pdb N2Cu.traj
>>>> Note that you miss some information contained in the traj files when
>>>> doing
>>>> the conversion to xyz/pdb (cell, local magnetic moments, constraints,
>>>> ...)
>>>> Therefore it's better to work with trajectory files and visualize them
>>>> with ase-gui.
>>>>
>>>> is it possible to open the file and see the results in VMD?
>>>> yes.
>>>>
>>>> Best regards,
>>>>
>>>> Marcin
>>>>
>>>>
>>>>
>>>> On Thu, Nov 6, 2014 at 1:54 PM, Marcin Dulak <Marcin.Dulak at fysik.dtu.dk
>>>> <mailto:Marcin.Dulak at fysik.dtu.dk>> wrote:
>>>> On 11/06/2014 01:17 PM, Zahid Hasan wrote:
>>>> Dear all,
>>>> Do I need to install Povray seperately to generate image? Is this the
>>>> software provided in the website http://www.povray.org/download/
>>>> yes, but povray won't work directly with ASE on windows due to Linux
>>>> oriented os.system calls in
>>>> https://trac.fysik.dtu.dk/projects/ase/browser/trunk/ase/io/pov.py
>>>> (povray ... > /dev/null, etc.).
>>>> Instead you can create the pov/ini povray files with an ASE python
>>>> script and then open the pov file with povray.
>>>>
>>>> Another problem you may encounter is when using ase.lattice module.
>>>> For some reasons the
>>>> https://trac.fysik.dtu.dk/projects/ase/browser/trunk/ase/lattice/spacegroup/spacegroup.dat
>>>> is not copied
>>>> during the msi installation of ASE to
>>>> C:\Python27\LIb\site-packages\ase\lattice\spacegroup.
>>>> You need to download this file manually.
>>>>
>>>> Best regards,
>>>>
>>>> Marcin
>>>>
>>>> Thanks,
>>>> Zahid
>>>>
>>>> On Tue, Nov 4, 2014 at 11:52 AM, Zahid Hasan <missionpagla at gmail.com
>>>> <mailto:missionpagla at gmail.com>> wrote:
>>>> I will request to just upload seperate windows msi installers, which
>>>> are compatible with each other and updated.
>>>>
>>>> On Tue, Nov 4, 2014 at 11:48 AM, Zahid Hasan <missionpagla at gmail.com
>>>> <mailto:missionpagla at gmail.com>> wrote:
>>>> I have deinstalled the ASE and installed the GPAW installer with ASE
>>>> inside. But unfortunately the test scripts do not work. It works only when
>>>> the seperate ASE installation is existing. Even after the GPAW test run it
>>>> shows runtime error, although it delivers some results!!
>>>>
>>>> On Tue, Nov 4, 2014 at 11:35 AM, Marcin Dulak <
>>>> Marcin.Dulak at fysik.dtu.dk<mailto:Marcin.Dulak at fysik.dtu.dk>> wrote:
>>>> Hi,
>>>>
>>>> yes, GPAW installer includes ASE.
>>>>
>>>> Best regards,
>>>>
>>>> Marcin
>>>>
>>>>
>>>> On 11/04/2014 10:59 AM, Zahid Hasan wrote:
>>>> The installer includes also the latest ASE
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ase-users mailing list
>>>> ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ase-users mailing list
>>>> ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ase-users mailing list
>>>> ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ase-users mailing list
>>>> ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ase-users mailing list
>>>> ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>>>>
>>>>
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20141118/fcc6910b/attachment-0001.html>
-------------- next part --------------
"Demonstrates molecular dynamics with constant energy."

from ase.calculators.emt import EMT
#from ase.lattice.cubic import FaceCenteredCubic
from ase.structure import molecule
from ase.md.velocitydistribution import MaxwellBoltzmannDistribution
                                        
from ase.md.langevin import Langevin
from ase import units
from ase.md import MDLogger
import numpy as np


#size = 3
    
# Set up a molecule
#atoms = FaceCenteredCubic(directions=[[1,0,0],[0,1,0],[0,0,1]], symbol="Cu",
                          #size=(size,size,size), pbc=True)
mole = molecule('SiF4')  
mole.center(vacuum=2)
atoms = mole.repeat((4,4,1))  

# Describe the interatomic interactions with the Effective Medium Theory
atoms.set_calculator(EMT())

# Set the momenta corresponding to T=373.15K
MaxwellBoltzmannDistribution(atoms, 573.15*units.kB)
#Stationary(atoms)
#ZeroRotation(atoms)

# We want to run MD with constant energy using the VelocityVerlet algorithm.
dyn = Langevin(atoms, 2*units.fs, 573.15*units.kB, 0.2, trajectory='MD-NVT-SiF4.traj')  # 5 fs time step.

#Function to print the potential, kinetic and total energy
def printenergy(a=atoms):
    epot = a.get_potential_energy() / len(a)
    ekin = a.get_kinetic_energy() / len(a)
    print ("Energy per atom: Epot = %.3feV  Ekin = %.3feV (T=%3.0fK)  Etot = %.3feV" %
           (epot, ekin, ekin/(1.5*units.kB), epot+ekin))
           
dyn.attach(printenergy, interval=1)   
dyn.attach(MDLogger(dyn, atoms, 'MD-NVT-SiF4.log', header=True, stress=False,
                        peratom=True, mode="a"), interval=1) 

for x in np.linspace(0, 100, 1):
    
    dyn.run(100)
    printenergy()

# Now run the dynamics
#printenergy(atoms)  
#traj = PickleTrajectory('MD-NVT-1-WH.traj', 'w')

   
#   printenergy(atoms)
#   traj.write(atoms)    


More information about the ase-users mailing list