[gpaw-users] [ase-users] ASE installation for windows
Zahid Hasan
missionpagla at gmail.com
Mon Nov 3 14:57:48 CET 2014
Dear all,
I tried to run the attached script of genetic algorithm in ASE windows
installation. But it shows "no module named ga.data" is found. Can you
please tell what the problem is.
Thanks,
Zahid
On Sat, Nov 1, 2014 at 1:37 PM, Marcin Dulak <Marcin.Dulak at fysik.dtu.dk>
wrote:
> Hi,
>
> On 11/01/2014 01:26 PM, Zahid Hasan wrote:
>
> Dear Marcin,
> What do you mean by "unpack the setups".
>
> you need to unpack https://wiki.fysik.dtu.dk/gpaw/setups/setups.html
> under C:\gpaw-setups,
> so the *gz files are located directly under this directory.
>
> Best regards,
>
> Marcin
>
>
> Regards,
> Zahid
>
> On Sat, Nov 1, 2014 at 1:13 PM, Marcin Dulak <Marcin.Dulak at fysik.dtu.dk>
> wrote:
>
>> On 11/01/2014 12:45 PM, Zahid Hasan wrote:
>>
>> Dear Marcin, Thank you for the mail. I am getting difficulty to install
>> GPAW in windows. Can you please send me an step by step instruction, how to
>> go for it, if you have. I have seen in the webpage. But whether I need the
>> C compiler and LibXC for that I don't know.
>>
>> it should be enough to follow the instructions:
>> https://wiki.fysik.dtu.dk/gpaw/install/installationguide.html#windows
>> It's msi installer that should contain everything. If IE renames the msi
>> file into man
>> (see
>> http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/downloading-an-msi-file-renames-it-man-really/590868e5-d0a4-4815-99b9-667a097340a3?msgId=e4ec196b-9b41-49a4-999a-cf6d9e6fa5c3)
>> just rename the file back to msi.
>> Don't forget to unpack the setups.
>>
>> Best regards,
>>
>> Marcin
>>
>>
>> Thank you.
>> Zahid
>>
>> On Sat, Nov 1, 2014 at 12:36 PM, Marcin Dulak <Marcin.Dulak at fysik.dtu.dk>
>> wrote:
>>
>>> Hi,
>>>
>>> On 10/31/2014 10:41 PM, Zahid Hasan wrote:
>>>
>>> Hi,
>>> I have sent a request 1 week back to put me in the user list. But got no
>>> reply.
>>>
>>> i don't see anything pending on ase-users. Simply send mail with the
>>> question to the list
>>> - no need to register in advance.
>>>
>>> Best regards,
>>>
>>> Marcin
>>>
>>>
>>> Thanks,
>>> Zahid
>>>
>>> On Fri, Oct 31, 2014 at 7:08 PM, Marcin Dulak <Marcin.Dulak at fysik.dtu.dk
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> please ask questions on the ase-users mailing list.
>>>> When reporting problems provide the full script and the error message.
>>>> The attached script works for me.
>>>>
>>>> Best regards,
>>>>
>>>> Marcin
>>>>
>>>> On 10/28/2014 05:34 PM, Zahid Hasan wrote:
>>>>
>>>> io.write('spacegroup-al.pov', al,
>>>> transparent=False,
>>>> display=False,
>>>> run_povray=True,
>>>> camera_type='perspective',
>>>> canvas_width=320,
>>>> radii=0.4,
>>>> rotation='90y',
>>>> bondlinewidth=0.07,
>>>> bondatoms=bondatoms,
>>>> )
>>>>
>>>>
>>>>
>>>>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20141103/29ad193a/attachment.html>
-------------- next part --------------
from ase.ga.data import PrepareDB
from ase.ga.startgenerator import StartGenerator
from ase.ga.utilities import closest_distances_generator
from ase.ga.utilities import get_all_atom_types
from ase.constraints import FixAtoms
import numpy as np
from ase.lattice.surface import fcc111
db_file = 'gadb.db'
# create the surface
slab = fcc111('Al', size=(4, 4, 1), vacuum=10.0, orthogonal=True)
slab.set_constraint(FixAtoms(mask=len(slab) * [True]))
# define the volume in which the adsorbed cluster is optimized
# the volume is defined by a corner position (p0)
# and three spanning vectors (v1, v2, v3)
pos = slab.get_positions()
cell = slab.get_cell()
p0 = np.array([0., 0., max(pos[:, 2]) + 2.])
v1 = cell[0, :] * 0.8
v2 = cell[1, :] * 0.8
v3 = cell[2, :]
v3[2] = 3.
# Define the composition of the atoms to optimize
atom_numbers = 2 * [47] + 2 * [79]
# define the closest distance two atoms of a given species can be to each other
unique_atom_types = get_all_atom_types(slab, atom_numbers)
cd = closest_distances_generator(atom_numbers=unique_atom_types,
ratio_of_covalent_radii=0.7)
# create the starting population
sg = StartGenerator(slab=slab,
atom_numbers=atom_numbers,
closest_allowed_distances=cd,
box_to_place_in=[p0, [v1, v2, v3]])
# generate the starting population
population_size = 20
starting_population = [sg.get_new_candidate() for i in range(population_size)]
# from ase.visualize import view # uncomment these lines
# view(starting_population) # to see the starting population
# create the database to store information in
d = PrepareDB(db_file_name=db_file,
simulation_cell=slab,
stoichiometry=atom_numbers,)
# population_size=population_size)
for a in starting_population:
d.add_unrelaxed_candidate(a)
More information about the gpaw-users
mailing list