QuantumWise Forum
May 24, 2013, 06:06 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: nc file versus py file  (Read 247 times)
0 Members and 1 Guest are viewing this topic.
jrussell
Regular ATK user
**

Reputation: 1
Offline Offline

United States United States

Posts: 10


View Profile
« on: May 28, 2012, 22:37 »

Dear ATK,

Sorry for a really dumb question, but I could use some help. OK, I made a simple graphite NC file test
job with VNL. It runs fine when I run it from VNL. Now I want to run the job on a cluster with multiple nodes.

I tried to submit the job to the cluster like this:
$IMPI_HOME/bin/mpiexec.hydra \
        -machinefile  $PBS_NODEFILE \
        -np $(wc -l < $PBS_NODEFILE) \
        atkpython graphite.nc > graphite.out

This crashes and I don't really understand why. I tried to run it interactively using atkpython from the
command line, and it didn't like the grahite.nc job file. But I know the job is ok because it ran fine in
VNL on the login node.

What do I need to do to make a .nc file run with atkpython?

For my project, I just want to be able to optimize a large structure with multiple processors (MPI on
cluster) using DFTB, with an output of a XYZ file, lattice vectors, and a total energy of the optimized structure.
I will do a bigger structure when I can get the test job to run on multiple nodes.

Thanks for the help! Again sorry if this is obvious but its not clear to me.
John

Code:
# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------
# Define A,B directions of lattice
vector_a = [ 2.461599,   0.000000,   0.000000]*Angstrom
vector_b = [-1.230800,   2.131808,   0.000000]*Angstrom
vector_c = [0.0, 0.0, 100.0]*Angstrom

# Define elements
elements = [Carbon, Carbon]

# Define coordinates
cartesian_coordinates= [[-0.615400,  -0.355301,   0.000000],
                        [ 0.615400,   0.355301,   0.000000]]*Angstrom

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=UnitCell(vector_a,vector_b,vector_c),
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = DFTBDirectory("cp2k/scc/")

#----------------------------------------
# Pair Potentials
#----------------------------------------
pair_potentials = DFTBDirectory("cp2k/scc/")

numerical_accuracy_parameters = NumericalAccuracyParameters(
    interaction_max_range=10.0*Ang,
    electron_temperature=300.0*Kelvin,
    reciprocal_energy_cutoff=1250.0*Hartree,
    number_of_reciprocal_points=1024,
    grid_mesh_cutoff=10.0*Hartree,
    radial_step_size=0.01*Ang,
    density_cutoff=1e-06,
    k_point_sampling=(1, 1, 1),
    )

iteration_control_parameters = IterationControlParameters(
    damping_factor=0.1,
    linear_dependence_threshold=0.0,
    algorithm=PulayMixer(),
    preconditioner=Preconditioner.Off,
    start_mixing_after_step=0,
    number_of_history_steps=20,
    max_steps=100,
    tolerance=0.0001,
    mixing_variable=HamiltonianVariable,
    )

poisson_solver = FastFourierSolver()

calculator = SlaterKosterCalculator(
    basis_set=basis_set,
    pair_potentials=pair_potentials,
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    iteration_control_parameters=iteration_control_parameters,
    poisson_solver=poisson_solver,
    charge=0.0,
    spin_polarization=False,
    )

bulk_configuration.setCalculator(calculator)
nlprint(bulk_configuration)
bulk_configuration.update()
nlsave('bulk.nc', bulk_configuration)

bulk_configuration = OptimizeGeometry(
        bulk_configuration,
        max_forces=0.05*eV/Ang,
        max_steps=200,
        max_step_length=0.5*Ang,
        trajectory_filename=None,
        disable_stress=True,
        optimizer_method=QuasiNewton(),
        )
nlsave('opt.nc', bulk_configuration)
nlprint(bulk_configuration)
printXYZFile('dump.xyz',bulk_configuration)
# -------------------------------------------------------------
# Total energy
# -------------------------------------------------------------
total_energy = TotalEnergy(bulk_configuration)
nlsave('energy.nc', total_energy)
nlprint(total_energy)
Logged
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #1 on: May 28, 2012, 22:56 »

NC files are output, not input. It's the binary container all results go into. To run a job you do

Code:
atkpython script.py > script.log

which produces file.nc (I think you get that the filenames are just random here).
Logged
jrussell
Regular ATK user
**

Reputation: 1
Offline Offline

United States United States

Posts: 10


View Profile
« Reply #2 on: May 28, 2012, 23:09 »

Ah ha! Thanks very much! It worked when I changed it to  graphite.py.

The parallel isn't working but I will contact my sysadmin for help there.
Thanks again!
John
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!