Mostrando entradas con la etiqueta montecarlo. Mostrar todas las entradas
Mostrando entradas con la etiqueta montecarlo. Mostrar todas las entradas

lunes, 29 de febrero de 2016

lenard jones potential


COMPUTER SIMULATION OF LIQUIDS, M.P. ALLEN, montecarlo

Dr. Domínguez

Ahora sí estos resultados tienen toda la pinta de ser buenos le anexo los
archivos y en este correo le pongo los resultados finales.

De todas maneras se encuentran en mi directorio

B07102segunda.txt

y B071002.txt,

los archivos de salida se indican en los textos.

Espero verlo mañana para comentar los resultados.

Solo le comento que dejè ejecutandose otros procesos, ademàs de que mañana
estoy checando lo de las claificaciones finales de la optativa.
Es probable que llegue algo tarde.

Voy a hacer todo lo posible por llegar a la hora.


Los procesos los puede checar directamente de esta computadora, diariamente
estoy ejecutando los mismos.

Todo el tiempo de CPU y procesador esrta ocupado.
Saludos

RPM

Nota: Son de Lenard Jones


17 -3.2551 0.4362
18 -3.2546 0.4407
19 -3.2483 0.4614
20 -3.2567 0.4559
** run values **
-3.0778 0.8076
** fluctation values **
31.6999 63.4592
# average movements = 0.50037545
Final values
# Part. fl-1= 600
# Part. fl-2= 400
Potential = -3.24844297
Total eng = -0.998442972
Temperature = 1.5
Final rcut = 5.
Density fl-1= 0.300000013
Density fl-2= 0.200000009
pres. in xy = 0.437672798
Real thickness in distr. func. = 0.06295
enter file



SEGUNDO POCESO DE LENNARD JONES

93 -4.5717 -0.1999
94 -4.5824 -0.1761
95 -4.5538 -0.2410
96 -4.5681 -0.2228
97 -4.5537 -0.2069
98 -4.5453 -0.1812
99 -4.5586 -0.2376
100 -4.5674 -0.2468
** run values **
-3.9278 0.4552
** fluctation values **
46.4518 92.9743
# average movements = 0.4989254
Final values
# Part. fl-1= 600
# Part. fl-2= 400
Potential = -4.52613729
Total eng = -3.32613729
Temperature = 0.8
Final rcut = 5.
Density fl-1= 0.300000013
Density fl-2= 0.200000009
pres. in xy = -0.161858026
Real thickness in distr. func.
= 0.06295
enter file


_________________________________________________________________
MSN. Más Útil cada Día. http://www.msn.es/intmap/

Attachment: B071002.txt (3 KB)    [ Download ]

[roberto@hdom01 MAESTRIA]$ ./canomixout
enter file
azar.dat
file azar.dat
Enter templating option
1) Fluid 1 with non-zero velocities
2) Fluid 1 with zero velocities (frozen molecules)
1
invalid integer: read unexpected character
apparent state: unit 3 named azar.dat
last format: list io
lately reading sequential formatted external IO
Aborted
[roberto@hdom01 MAESTRIA]$ emacs azar.dat &
[1] 1191
[roberto@hdom01 MAESTRIA]$ ./canomixout
enter file
azar.dat
file azar.dat
Enter templating option
1) Fluid 1 with non-zero velocities
2) Fluid 1 with zero velocities (frozen molecules)
1
Enter random number integer
987354672
canomix version 0.1
Montecarlo simulation of binary Lennard-Jones atoms
option of frozen particles (the first n)
Periodic Boundaries in all directions
HECTOR DOMINGUEZ Sep 2001
Enter file to keep last running data
t071002.dat
file t071002.dat
Enter file to keep density profile
t071002d.dat
file t071002d.dat
Enter file to keep g(r), pair correl. func. data
t071002g.dat
file t071002g.dat
Enter max. displ. par.
0.2
Enter number of blocks
20
Enter number of cycles
1000
Enter interval for update of max. displ.
20
Enter temperature
1.5
Enter potential cutoff distance
5.0
Enter LJ epsilon, sigma 1-2 fluid interaction
1
1
Enter LJ epsilon, sigma 2-2 fluid interaction
1
1
Number of blocks = 20
Number of cycles = 1000
Ratio update interval for atoms = 20
Maximum displacement = 0.2
maximun change in box = 0.
initial temperature = 1.5
Potential cutoff distance = 5.
Epsilon and sigma for the 1-2 = 1. 1.
Epsilon and sigma for the 2-2 = 1. 1.
Initial values
# Part. fl-1= 600
# Part. fl-2= 400
Potential = 6591.7272
Total eng = 6593.9772
Temperature = 1.5
Density1 = 0.300000013
Density2 = 0.200000009
Volume = 1999.99991
press. = 13203.135
start of Markov Chain


cycle Potential presxy
1 0.3157 7.6112
2 -3.2595 0.4559
3 -3.2584 0.4536
4 -3.2431 0.4439
5 -3.2581 0.4486
6 -3.2639 0.4552
7 -3.2570 0.4436
8 -3.2526 0.4498
9 -3.2570 0.4540
10 -3.2575 0.4539
11 -3.2660 0.4500
12 -3.2571 0.4389
13 -3.2566 0.4486
14 -3.2538 0.4557
15 -3.2572 0.4447
16 -3.2594 0.4506
17 -3.2551 0.4362
18 -3.2546 0.4407
19 -3.2483 0.4614
20 -3.2567 0.4559
** run values **
-3.0778 0.8076
** fluctation values **
31.6999 63.4592
# average movements = 0.50037545
Final values
# Part. fl-1= 600
# Part. fl-2= 400
Potential = -3.24844297
Total eng = -0.998442972
Temperature = 1.5
Final rcut = 5.
Density fl-1= 0.300000013
Density fl-2= 0.200000009
pres. in xy = 0.437672798
Real thickness in distr. func.
= 0.06295
enter file




Attachment: B07102segunda.txt (5 KB)    [ Download ]

m01 roberto]$ ./canomix
bash: ./canomix: No such file or directory
[roberto@hdom01 roberto]$ cd MAESTRIA
[roberto@hdom01 MAESTRIA]$ ./canomixout
enter file
azar.dat
file azar.dat
Enter templating option
1) Fluid 1 with non-zero velocities
2) Fluid 1 with zero velocities (frozen molecules)
1
Enter random number integer
764836298
canomix version 0.1
Montecarlo simulation of binary Lennard-Jones atoms
option of frozen particles (the first n)
Periodic Boundaries in all directions
HECTOR DOMINGUEZ Sep 2001
Enter file to keep last running data
segunda071002.dat
file segunda071002.dat
Enter file to keep density profile
segunda071002d.dat
file segunda071002d.dat
Enter file to keep g(r), pair correl. func. data
segunda071002g.dat
file segunda071002g.dat
Enter max. displ. par.
0.3
Enter number of blocks
100
Enter number of cycles
100
Enter interval for update of max. displ.
10
Enter temperature
0.8
Enter potential cutoff distance
5.0
Enter LJ epsilon, sigma 1-2 fluid interaction
1
1
Enter LJ epsilon, sigma 2-2 fluid interaction
1
1
Number of blocks = 100
Number of cycles = 100
Ratio update interval for atoms = 10
Maximum displacement = 0.3
maximun change in box = 0.
initial temperature = 0.8
Potential cutoff distance = 5.
Epsilon and sigma for the 1-2 = 1. 1.
Epsilon and sigma for the 2-2 = 1. 1.
Initial values
# Part. fl-1= 600
# Part. fl-2= 400
Potential = 6591.7272
Total eng = 6592.9272
Temperature = 0.8
Density1 = 0.300000013
Density2 = 0.200000009
Volume = 1999.99991
press. = 13202.785


start of Markov Chain


cycle Potential presxy


start of Markov Chain


cycle Potential presxy
1 33.6789 74.1152
2 -3.6426 -0.5086
3 -3.7066 -0.4620
4 -3.7283 -0.4243
5 -3.7805 -0.4379
6 -3.8191 -0.4517
7 -3.8402 -0.4235
8 -3.8604 -0.4275
9 -3.9027 -0.4249
10 -3.8883 -0.4507
11 -3.9061 -0.4167
12 -3.9313 -0.3878
13 -3.9550 -0.4116
14 -3.9837 -0.3703
15 -4.0019 -0.3847
16 -3.9885 -0.3477
17 -4.0030 -0.4103
18 -4.0224 -0.3956
19 -4.0120 -0.3556
20 -4.0399 -0.3555
21 -4.0403 -0.3620
22 -4.0675 -0.3365
23 -4.0792 -0.3552
24 -4.1193 -0.3367
25 -4.1399 -0.3812
26 -4.1170 -0.3727
27 -4.1248 -0.3201
28 -4.1278 -0.3585
29 -4.1127 -0.3373
30 -4.1231 -0.3432
31 -4.1538 -0.3693
32 -4.1612 -0.3132
33 -4.1610 -0.2831
34 -4.1622 -0.3646
35 -4.2124 -0.3532
36 -4.2304 -0.3271
37 -4.2298 -0.3730
38 -4.2615 -0.3406
39 -4.2602 -0.3044
40 -4.2665 -0.3701
41 -4.2685 -0.2826
42 -4.3001 -0.3380
43 -4.3196 -0.2916
44 -4.3090 -0.3088
45 -4.3326 -0.2783
46 -4.3440 -0.3121
47 -4.3423 -0.3291
48 -4.3598 -0.3448
49 -4.3951 -0.2765
50 -4.4366 -0.2375
51 -4.4399 -0.2436
52 -4.4328 -0.3088
53 -4.4243 -0.2961
54 -4.3897 -0.2635
55 -4.4331 -0.2961
56 -4.4742 -0.3204
57 -4.4689 -0.2559
58 -4.4713 -0.1707
59 -4.4586 -0.2041
60 -4.4846 -0.2090
61 -4.5113 -0.1919
62 -4.4891 -0.2450
63 -4.4959 -0.2000
64 -4.5223 -0.2302
65 -4.4986 -0.1891
66 -4.4983 -0.2120
67 -4.4997 -0.2043
68 -4.5011 -0.2214
69 -4.4819 -0.2194
70 -4.4954 -0.2080
71 -4.5185 -0.2559
72 -4.5218 -0.1825
73 -4.4959 -0.2095
74 -4.4866 -0.2468
75 -4.4859 -0.1903
76 -4.5411 -0.1993
77 -4.5465 -0.1804
78 -4.5242 -0.1752
79 -4.5203 -0.1891
80 -4.5214 -0.1913
81 -4.5429 -0.2533
82 -4.5276 -0.1887
83 -4.5439 -0.1838
84 -4.5541 -0.1987
85 -4.5826 -0.2003
86 -4.5679 -0.2543
87 -4.5893 -0.2018
88 -4.5487 -0.1671
89 -4.5973 -0.1922
90 -4.5827 -0.1557
91 -4.5541 -0.2241
92 -4.5636 -0.2069
93 -4.5717 -0.1999
94 -4.5824 -0.1761
95 -4.5538 -0.2410
96 -4.5681 -0.2228
97 -4.5537 -0.2069
98 -4.5453 -0.1812
99 -4.5586 -0.2376
100 -4.5674 -0.2468
** run values **
-3.9278 0.4552
** fluctation values **
46.4518 92.9743
# average movements = 0.4989254
Final values
# Part. fl-1= 600
# Part. fl-2= 400
Potential = -4.52613729
Total eng = -3.32613729
Temperature = 0.8
Final rcut = 5.
Density fl-1= 0.300000013
Density fl-2= 0.200000009
pres. in xy = -0.161858026
Real thickness in distr. func.
= 0.06295
enter file



COMPUTER SIMULATION OF LIQUIDS

M.P. ALLEN

D.J. TILDESLEY

OXFORD SCIENCE PUBLICATIONS

Este es un libro para enseñar a las personas que esten interesadas en la
creación y diseño de simulaciones del comportamiento de liquidos atómicos y
moleculares.
Este libro será útil para lños estudiantes de primer año de graduación.

Este tipo de programas de simulaciones se han llevao a cabo alo largo de
generaciones de estudiantes y maestros, los cuales se han dado a la tarea de
completar y recompilar estos programas.

En los primeros seis capítulos del libro se dan a conocer los tacnicas de
simulación, llamdas MONTE CARLO Y DE DINÁMICA MOLECULAR.


Introducción

Una breve historia de la simulacion computacional

En los modelos antiguos de líquidos, se sontenía que los líquidos eran una
aglomeración de un gran número de moléculas, y hasta la fecha hay algo
interesante en el estudio de ensambles de bolas mecánicas, puestan en
movimiento por vibración mecánica.

De cualquier manera el uso de una gran cantidad de objetos físicos para
representar molèculas puede consumir mucho tiempo, hay limitaciones obvias
en el tipo de interacción entre ellas, y os efectos de gravedad no pueden
ser despreciados.

La extensión natural de esta aproximación es el uso de un modelo matemático,
en lugar de un modelo físico, y ejecutar el análisis por computadora.

Desde hace 50 años se utilizaron computadoras muy poderosas, como la
computadora ENIAC de Los Alamos National Laboratories.

Loas trabajos más antiguos fundaron lo que ahora se conoce como Método de
MonteCarlo , que abreviaremos como MC. Las primeras simulkaciones fueropn
bastante idealistas, utilizando para ellos modelos como moléculas esféricas,
se podría decir que el primer método llevado a cabo fue el del gas ideal
como primera aproximación.

Posteriormente se llevaron a cabo simulaciones con una interacción del
potencial de Lennard-Jones. Esto hizo posible ue se compararan resultados de
simulación por computadora y el gas argon.

Una técnica difreente se ha utilizado para obtener las propiedades dinámicas
de una gran cantidad de partículas. Dinámica Molécular (MD), es el término
usado para describir la solución de la ecuación clásica de movimiento de
Newton (newton Equation) de un conjunto de moléculas.

Fué Rahman 1964, quien se dedicó a resolver la ecuación de movimiento de
Newton bajo la interacción de un potencial de Lennard- Jones, o con
artículas de Lennard-Jones.

Posteriormente de este desarrollo de la dinámica molecular, se desarrollo
ampliamente la simulación computacional.

SIMULACION COMPUTACIONAL: MOTIVACIONES Y APLICACIONES

Algunos problemas en mecánica estadística son exactamente solubles, uno de
los más famosos es el modelo del gas ideal PV = NKT.

Algunos problemas en mecánica estadística, que no tienen una solución
exacta, pueden resolverse si se utiliz un análisis de aproximaciones.

Es importante hacer notar que es de gran ayuda poder encontrar un modelo que
se pueda comportar como un líquido (el cual debe ser muy idelizado).

Las simulaciones computacionales juegan un rol muy importante para obtener
esencialmente, resultados exactos para problemas en mecánica estadística,
que de otra manera solo podían resolverse por métodos aproximados, o
simplemente no se podían resolver.

En el siguiente diagrama se muestra, el desarrollo de la relación entre un
modelo computacional y un modelo teórico, así como un diagrama de flujo para
comparar los modelos teoricos y experimentales.

La simualción computacional provee una ruta directa de los detalles
microscópicos de un sistema (las masas de los átomos, la interacción entre
ellos, la geometría molecular, etc.) a las propiedades macroscópicas de
interés experimental (la ecuación de estado, los coeficientes de transporte,
parametros de orden estructural, y algunos otros). Así como son de interés
académico, este tipo de información es útil tecnolóogicamente hablando.
Sería practicamente imposible llevar a cabo experimentos bajo condiciones
extremas de teperatura y presión, cuando una simulación computacional de un
plasma a temperatura extrema, de un reactor nuclear, o de un sistema
planetario es perfectamente posible.

Finalmente, cuando la velocidad de los eventos moleculares es en si mismo
una dificultad experimental, este no es problema para el simulador. Un
amplio rango de fenómenos físicos desde la escala molecular a la escala
galáctica, puede ser estudiada usando la técnica de simulación
computacional.

En la mayoría del libro, estaremos al tanto de los detalles de llevar a cabo
una simulación computacional. En el resto del capítulo, mostraremos como
ingresar información a la computadora, yy en el capítulo 2 mostraremos como
obtener información de la computadora.

MODELACIÓN DE SISTEMAS Y POTENCIALES DE INTERACCIÓN.

INTRODUCCIÓN.

En la mayoría del libro, el estado microscópico de un sistema puede ser
especificado en términos de las posiciones y momentos de un conjunto
constitutivo de partículas: los átomos y moléculas.

Con la aproximación de Bohrn-Oppenheimer, es posible expresar el
hamiltoniano de un sistema en función de las variables nucleares, el
movimiento de los electrones han sido promediados. Haciendo la aproximación
adicional donde una descripción clásica es adecuada, podemos escribir el
hamiltoniano H de un sistema de N moléculas como la suma de ls funciones de
energia cinética y potencial de un conjunto de coordenadas generalizadas qi
y de momentos pi para cada molécula i. Adoptando una notación condensada:

tenemos:



Las coordenadas generalizadas q pueden ser simplemente el conjunto de
coordenadas cartesianas de cada átomo ( el núcleo) en el sistema, pero, como
veremos, es muchas veces más útil tratar moléculas como cuerpos rígidos, en
tal caso q consistirá de coordenadas cartesianas de cada centro de masa de
cada molécula, en conjunto con variables , que especifican la orientación
molecular. En cualquier caso, p se mantiene para un conjunto apropiado de
momentos conjugados. Usualmente, la energía cinética H toma la forma:



donde mi es la masa molecular, y el índice a varía sobre diferentes (x,y,z)
componentes del momento de la molécula i. La energía potencial V contiene
información interesante en relación con la interacción intermolecular:
asumiendo que V (is fairly sensibly behaved), será posible construir, de H,
una ecuación de movimiento (en la forma de Hamiltoniano, lLagrangiano o
Newton) que gobernará totalmente la evolución temporal de un sistema y de
todas sus propiedades mecánicas. La solución a esta ecuación invoucrará los
calculos a partior de V, las fuerzas fi, y torques tao, actuando sobre las
moléculas. El hamiltoniano también dictará la funcion de distribución de
equilibrio para las posiciones moleculares y los momentos. Entonces,
generalmente, es H (o V) es la entrada básica de una simulación
computacional. La aproximación usada universalmente en una simulación
computacional es el particionar la energía potencial en términos que
involucren pares, tripletes, etc., de moléculas. En la siguiente sección se
considerará esto en detalle.

Antes de abandonar esta sección, mencionaremos brevemente algunas diferentes
aproximaciones de los calculos de V. En estos desarrollos, la distribución
de electrones en el sistema no se modela por un potencial efectivo V(q),
pero es tratado por una forma de la teoría de densidad funcional. En una
aproximación, la densidad electrónica se representa por una extensión de la
teorúia del gas de electrones. En otra, los grados de libertad electrónica
son explicitamente incluídos en la descripción, y los electrones son
aceptados a relñajarse durante el curso de la simulación por el proceso
conocido como simulación annealing (simulated annealing). Estos dos métodos
permiten la división de V into pairwise and terminos de grado mayor. Esto
parece prometedor para simulaciones futuras de sólidos y líquidos.


SISTEMAS ATÓMICOS.

Cnsideremos primero el caso de un sistema que contiene N atomos. La energía
potencial puede ser dividida entre los terminos dependiendo de sus
coordenadas de átomos individuales, pares, tripletes, etc.:



El primer térimino en la ecuación 1.4 representa el efecto de un campo
externo, (incluyendo, por ejemplo, las paredes contenedoras) en el sistema.
Los terminos restantes representan las interacciones de partículas. El
segundo término v2, el potencial par, es el más importante,. El potencial
par depende solamente de la magnitud de la separación par, entonces puede
ser escrito v2(rij). La figura 1.3 muestra uno de los más recientes
estimados para el potencial par entre dos átomos de argon, como una función
de la separación. Este potencial BBMS fue derivado considerando una gran
cantidad de datos experimentales, incluyendo esparcimiento molecular de
rayos, espectroscopía del argón (dimer), y propiedades de estado sólido,
junto con los cálculos teóricos de las contribuciones de largo-rango. El
potencial es también consistente con los estimados actuales de coeeficientes
de transportación en la fase de gas.

El potencial BBMS muestra las características típicas de la intercción
intermolecular. Se muestra un comportamiento atractivo en grandes
separaciones, esecnialmente debido a la correlación entre las nubes de
electrones de los atoms (van der walls o london dispersion). En adición a
especies de carga, terminos coulombianos estaran presentes. Hay un poso
negativo, responsable de la cohesión en fases condensadas. Finalmente, hay
un muro repulsivo, ó escalón repulsivo a distancias cortas, debido a la
repulsión entre las nubes de neutrones.

El término v3 en la ecuación (1.4), involucra tripletes de moléculas, es
indudablemente significativo para densidades de líquidos. Estimaciones de la
magnitud de la contribución del triple-dipole, y del sistema de tres
cuerpos, han sido hechos para gases inertes en su estado sólido. Se ha
encontrado que mas del 10 % de la energía (lattice) de argón, (y más en el
caso de especies más polarizables), puede ser debido a estos términos no
aditivos en el potencial, podemos esperar el mismo orden de magnitud para
mantenerse en la fase líquida. Cuatro-cuerpos (y más de cuatro) terminos en
la ecuación (1.4) se espera que sean pequeños en comparación con v2 y v3.

Debido al tamaño de los terminos debido a los tres cuerpos en el potencial,
son raramente incluidos en las simulaciones computacionales, esto es debido
a que los calculos sobre la resolución de este problema tomaríoa mucho
tiempo para su resolució. Afortunadamente, la aproximación de la interacción
par da una buena descripción de las propiedades de los líquidos debido a que
el promedio de los efectos de la interacción de tres cuerpos puede ser
incluida parcialmente definiendo un par potencial "efectivo". Para hacer
esto, reescribimos la ecuación (1.4) en la forma:


Los potenciales pares que aparecen en las simulaciones computacionales son
generalmente pares potenciales efectivos de este tiopo (regarded),
representando todos los efectos de muchos cuerpos, para simplificar,
solamente usaremos la notación v(rij) o v(r). A consecuencia de esta
aproximación tenemos que el potencial par efectivo necesario para reproducir
experimentalmente los datos puede apagarse para depender de la densidad,
temperatura, etc, cuando el potencial de dos cuerpos v2(rij) claramente no
lo hace.

Ahora veamos el más simpple, más idealizado, potencial par comunmente usado
en las simualciones computacionales. Esto refleja las características de las
interacciones reales de una manera empirica y general. Ilustrado con el BBMS
potencial de argon en la figura 3 es un simple potencial Lennard Jones.



El cual provee una descripción razonable de las propiedades del argón, via
simulación computacional, si los parámetros epsilon y sigma se escogen
apropiadamente. El potencial tiene un largo rango de atractive tail de la
forma, un pozo negativo de ondo, y un muro negativo (negative well) de
ancho, y un muro repulsivo escalonado para distancias menores a .


Para nuestro proposto de investigar las propiedades generales de los
líquidos, y por comparación con la teoría, alatamente idelizados potenciales
parespuede ser de valor. En la figura 1.4, ilustramos tres formas donde,
algo irrealistics, son muy simples y convenientes para usar en las
simulaciones computacionalesy en la teoríoa de estado líquido. Estas son:
potencial de esfera-dura:


El potencial de pozo cuadrado


y el potencial de esfera suave


donde nu es un parámetro, algunas veces entero. El potencial de esfera
suave, se vuelve progresivamente suave conforme se va incrementando nu. El
potencial de esfera suave contiene una parte no atractiva.

Algunas veces e útil dividir los potenciales realmente en sus componentes
atractivas y repulsivas, y la separación propuesta por Weeks, Chandler, y
Anderson involucra splitting el potencial al mínimo. Para el potencial
Lennard-Jones, las partes atractivas y repulsivas son:

Esta separación se ilustra en la figura 1.5. En la teoría de perturbación,
un fluido hipotético de moleculas interactúa via el potencial repulsivo , es
tratado como un sistema de referencia y la parte atractiva es la
perturbación. Se deberíua de notar que el potencial es significativamente
fuerte en relación al inverso de la 12va potencia del potencial de esdera
suave, que es pensado algunas veces como la parte repulsiva de


Fig. 1.5


Para iones, como es de esperarse, estos potenciales no son suficiente para
representar las interacciones de largo alcance. Una simple aproximación es
para suplir uno de los potenciales pares con la interacción carga a carga de
Coulomb.



(1.11)


donde zi, zj, son las cragas en los iones i y j, y epsilon es la
permitividad del vacío, no confundirse con la otra epsilon.

Para sistemas ionicos, las interacciones de inducción son importantes: la
carga del ión induce un dipolo en la vecindad del ion. Ete termino no es
aditivo par y es dificil incluirlo en la simulación. El modelo de concha es
un intento cruso de tomar esta polarización del ión en cuenta.



CALCULANDO EL POTENCIAL

Este es el momento apropiado para introducir nuestra primera pieza de codigo
computacional, el cual ilustra el cálculo de la energía potencial en un
sistema de átomos de Lennard-Jones. Convirtiendo las ecuaciones algebraicas
de este capítulo en código de FORTRAN. Suponemos que los vectores
coordenados de nuestros átomso estaan situados en tres arreglos de Fortran
RX(I), RY(I), RZ(I), con el índice de partícula I vaiando de 1 a N (el
núemro de partículas). Para el potencial de Lennard-Jones es útil tener ya
precomputarizado el valor de sigma cuadrada, el cual se encuentra en la
variable SIGSQ. La energía potencial se pondrá en una variable llamada V, el
cual se lleva a cero inicialmente, y posteriormente es acumulada en un doble
loop sobre todos los distintos pares de átomos, teniendo cuidado de contar
cada par solamente una vez:


V = 0.0

DO 100 I=1, N-1

     RXI =RX(I)
     RYI =RY(I)
     RZI =RZ(I)

DO 99 J=I+1, N

     RXIJ = RXI - RX(J)
     RYIJ = RYI - RY(J)
     RZIJ = RZI - RZ(J)

RXIJ = RXI - RX(J)
RYIJ = RYI - RY(J)
RZIJ = RZI - RZ(J)

RIJSQ = RXIJ ** 2 + RYIJ ** 2 + RZIJ ** 2
SR2 = SIGSQ/RIJSQ
SR6 = SR2*SR2*SR2
SR12 = SR6**2
V = V + SR12-SR6

CONTINUE

CONTINUE

V = 4.0 * EPSILON *V

















Attachment: maestria2nis.txt (0 KB)    [ Download ]

Hay varias maneras de codificar las correciones de mínima imagen. Hemos
mencionado también la posibilidad de conducir simulaciones en condiciones
de contorno periódico no-cúbico. El código FORTRAN para implementar la
correción mínima de imagen en el caso del octaedro truncado y el dodecaedro
rómbico




Attachment: buenoinpMC.txt (2 KB)    [ Download ]

enter file
final.dat
file final.dat
Enter random number integer
2937484
iimc version 0.1
Montecarlo simulation of Lennard-Jones atoms
Periodic Boundaries in all directions
HECTOR DOMINGUEZ
Enter file to keep last running data
finalc1.dat
file finalc1.dat
Enter file to keep g(r) data
grfilc.dat
file grfilc.dat
Enter max. displ. par.
0.3
Enter number of blocks
10
Enter number of cycles
500
Enter interval for update of max. displ.
10
Enter temperature
0.7
Enter potential cutoff distance
3.5
No. points in distr.func. = 100
Thickness for g(r) bins = 0.05
Number of blocks = 10
Number of cycles = 500
Ratio update interval for atoms = 10
Maximum displacement = 0.3
initial temperature = 0.7
Potential cutoff distance = 3.5
-- Virial --= -970.579174
Initial values
# Part. = 500
Potential = -3.6020609
Total eng = -2.5520609
Temperature = 0.7
Density = 0.5
Pressure = -0.620579174


start of Markov Chain


cycle Potential pressure
1 -3.9087 -0.4861
2 -4.0612 -0.4100
3 -4.1057 -0.4241
4 -4.2001 -0.3787
5 -4.1569 -0.3845
6 -4.1373 -0.3958
7 -4.1988 -0.3953
8 -4.2517 -0.3075
9 -4.2680 -0.4024
10 -4.2723 -0.3557
** run values **
-4.1561 -0.3940
** fluctation values **
0.1215 0.0987
Final values
# Particles = 500
Potential = -4.27195038
Total eng = -3.22195038
Temperature = 0.7
pressure = -0.270289173
[roberto@hdom01 MAESTRIA]$



Attachment: tesis1.txt (12 KB)    [ Download ]


LA APROXIMACIÒN SEMICLASICA
Un tratamiento completo de mecànica cuàntica sobre el esparcimiento elàstico
desde un potencial central W(R) inicia desde la ecuaciòn independiente del
tiempo de Schrödinger (en el sistema coordenado del centro de masa)

(2.33)

el cual tiene que resolverse sujeto a la condiciòn de frontera

(2.34)

donde E = .


El primer término en (2.34) representa una onda plana incidente paralela al
eje Z y el segundo representa las ondas esparcidas hacia afuera. La amplitud
de la onda esparcida, , determina la secciòn de cruce diferencial dentro de
la relaciòn


En el tratamiento de onda-parcial (partial-wave) de Faxén y Holtsmark
(1927), es desarrolladsa en series de polinomios de Legendre. Se asume que
W(R) no es más singular en el origen de lo que es * y no es significativo,
en *, más rápido que 1/R. Si Pl(x) es el polinomio de Legendre de oren l,
tenemos:

(2.36)

donde las funciones radiales Ul(R) son las soluciones regulares de:

(2.37)

Estas soluciones tienen la forma asintótica a lo largo de R:

(2.38)

donde Cl y * son independientes de R. Las constantes * son conocidas como
las fases superiores (phase shifts), y determinan la amplitud de
esparcimiento, las cuales tienen una expansión en serie como se muestra a
cotinuación:

(2.39)

La expresión (2.39) para f(*) siempre es convergente para el potencial
central satisfaciendo las condiciones específicas, pero la evaluación de la
suma es algunas veces impractica, o inconveniente, en el esparcimiento
átomo-átomo debido a la gran cantidad de valores de importancia asociados a
l, (o de l).

Debido a esta dificultad, métodos semi-clásicos han sido desarrollados, los
cuales tienen mucha de la simplicidad de la aproximación puramente clásica,
pero los cuales permiten para los efectos de interferencia cuántica, los
cuales son producidos en el esparcimiento por potenciales reales.

En la aproximaciòn semi-clàsica (Ford y Wheeler 1959; Berry y Mount 1972;
Child 1974), los términos principales son retenidos en la expansión de el
levantamiento de fase * en potencias de h, usando el método WKB
(Wentzel-Kramers-Brillouin). Un potencial efectivo de una dimensión Weff(R)
puede ser definido como

(2.40)

donde el segundo término refpreseta la barrera centrífuga. Proveído de este
potencial posee un punto clásico de vuelta, la siguiente WKB aproximación se
obtiene del levantamiento de fase.

(2.41)

donde

(2.42)

Para una atracción fuerte, la variación de Weff con l se muestra en la
figura 2.5. Parece mostrar que para valores grandes de E y l existe un punto
de vuelta clásico, pero para pequeños valores existen tres puntos de vuelta
en R=Ro, R1, y R2. La orbita singular clásuica ocurre cuando la energía E
coincide con el máximo en el potencial efectivo donde la puntos de vuelta en
Ro y R1 se juntan. (Fig. 5(b)).




Fig 5(a) La variación del potencial efectivo Weff(R) definiido por (2.40)
para valores diferentes del momento angular cuántico l, con l1>l2>l3>l4>l5.
(b) Esta es una ilustración a gran escala. Es una escala mayor a (a) y
muestra la variación de Weff(R) con R para un valor dado de l= l', donde l'
es suficientemente pequeño para Weff(R) para exibir un máximo y un mínimo.
Para energías grandes tal como E = E3 existe un punto de vuelta clásico en R
= Ro', pero para energías pequeñas tales como E = E1 existen tres puntos de
vuelta en Ro, R1, y R2. Para la energía E = E2 la cual coincide con el
máximo en Weff(R) los puntos de vuelta (quiebre) Ro y R1 se juntan.

La modificación a la fase semi-clásica de cambio para tres puntos de vuelta
se discutirá posteriormente.

La condición para la expresión (2.41) parta ser una buena aproximaión para
la fase de cambio exácta es que el potencial efectivo debería no variar
apreciablemente sobre distancias comparables a la longitud de onda de de
Broglie, excepto en la vecidad inmediata del punto de vuelta clásico. esta
condición puede ser expresada como sigue:

(2.43)

En general, bajo condiciones semi-clásicas, los valores importantes de l son
grandes, en este caso l puede ser relacionada al parámetro de impacto
clásico b por la siguiente relación:


(2.44)




donde L es el momento angulare clásico.

Haciendo esta identificación y tratando a l como una variable continua
parece ser que k(R) y f(R), definidas en (2.42) y (2.24), respectivamente,
difieren sólo por una constante:

y también, de (2.26), (2.25) y (2.41)

(2.45)

Esto es conocido como la relación clásica de equivalencia.

El desarrollo de la aproximación semi-clásica procede de dos pasos nuevos:

1. Asumir en la expresión (2.39) para el esparcimiento de amplitud f(*) se
puede reemplazar por una integración, de la siguiente manera:


(2.46)

2. Los polinomios de Legendre son reemplazados por el término principal de
sus expansiones asintóticas:

(2.47a)

(2.47b)

donde Jo(x) es la función de Bessel de primer tipo de orden cero. Estas
aproximaciones para Pl(cos *) pueden ser empleadas para toda l>1.

Usando las aproximaciones (2.47a y b) en (2.46), la integral sobre l puede
ser evaluada por el método de fase estacionaria o una aproximación similar.


2.5 ESPARCIMIENTO HACIA FUERA DE LA REGIÓN DEL ANGULO PEQUEÑO (SMALL-ANGLE).

Debemos considerar primero el esparcimiento en ángulos cuya aproximación
(2.47a) se mantenga, esto es, a ángulos no muy cerca de la dirección
horizontal (*=0) o (*=*). Usando la relación para *=0

(2.48)

se muestra que el término [*] en (2.46) puede reemplazarse por exp(*).

Usando (2.47a), econtramos entonces:

(2.49a)


donde


(2.49b)

Para la mayoría de valores de l, la variación de * y * con l es más rápida y
las partes reales e imaginarias del integrando en (2.49a) oscila
rapidamente en relación al cero.

Las mayores contribuciones a la integral entonces vienen de regiones en
donde tanto * ó * es cero, y estan son reguiones de la fase estacionaria.

Usando la relación clásica de equivalencia (2.45) vemos que si * =0, para l
=l'entonces:


(2.50)



Esta relación muestra que el punto de fase estacionaria, en l = l', para un
ángulo dado de esparcimientro *, se determina por el parámetro de impacto
clásico correspondiente al mismo ángulo de esparcimiento. La relación (2.45)
y (2.50) son correctas en el caso que exista solamente un punto de vuelta
clásico en el potencial efectivo EWeff(R), en tal caso |*| < . Si el
orbitamiento ocurre para el cual |*| > *, una modificación debe llevarse a
cabo, tal consideración debe tomar en cuenta lo que se muestra en a sección
2.7. Si *(b,E) se alcanza para una trayectoria repulsiva, *>0 y el punto de
fase estacionaria está en *, cuando *(b,E) se levanta de una trayectoria
atractiva, *<0, y el punto de fase estacionaria está en *.

POTENCIALES REPULSIVOS

Vamos a considerar primero un potencial repulsivo W(R)>0 , para el cual
*(b,E) decrece monótonamente desde *=* a b=0 a b - *. Hay un punto de fase
estacionaria para un ángulo dado de esparcimiento * en l = l', esto es en
b=b', y expandiendo * con referencia a este punto encontramos

(2.51)

Desde

(2.52)

vemos que * es negativo y

(2.53)

Usando (2.53) y (49), se encuentra que:

(2.54)


donde, desde la única contribución importante a la integral viene de la
reguión de l = l', el término de variación lenta (l + 1/2)^(1/2) se ha
tomado fuera de la iontegral, y el límite inferior se ha extendido desde l=0
a l = -*.


Usando el resultado estándar


(2.55)


obtenemos:


(56)

donde

(57)

y donde I(*) es la sección de cruce diferencial clásica (30). Se sigue que
para un potencial repulsivo puro la semi-clásica y clásica sección de cruce
son identicas. Este resultado no es correcto si sólo unos cuantos cambios
de fase de bajo orden contribuyen a la suma (39) y requiere que la región de
fase estacionaria , de ancho *l =**, es grande en comparación con la unidad.
Es claramente necesario que el potencial W(R) debe variar ligeramente con R
en orden de que * debe también variar ligeramente (smoothly) con l.


REPULSIÓN INTERNA- ATRACCIÓN EXTERNA

Vamos a considerar la forma típica de las funciones de deflección para
esparcimiento ión-átomo, en la ausencia de orbitación, mostrado en la Fig.
4, correspondiente al potencial W(R) con una región repulsiva interna y una
región xterna atractiva. Parece mostrar que el valor más negativo de * es
igual a -*, donde * es el ángulo arcoiris y

si





Provee la región de fase estacionaria en b = bi están bien separados de la
amplitud de esparcimiento f(*) es la suima de las contribuciones de fi(*)
para cada región, entonces:


(2.58)

La contribución de los tres puntos de la fase estacionaria, para *<*. puede
ser evluada a lo largo de las mismas líneas para el potencial repulsivo. Se
encuentra que

(2.59)

donde * es la sección de cruce diferencial para b = bi y

(60)

Para obtener (60) el hecho es que se uso que * es negativa en l = l1 y l
=l2 (esto es b = b1 y b =b2) pero positiva en l = l3 (b = b3)




Fig 6. Forma típica de una sección de cruce diferencial, ampliada por sin
*, para una fucnión de deflección de la forma mostrada en la Fig. 4. El
primario y supernumerable arcoiris máximo son A, B, C, ... y el ángulo
arcoiris en *=* se marca por una flecha. Las oscilaciones rápidas son
debidas a la interferencia entre la amplitud para el esparcimiento arcoiris
f(*) con la amplitud fo(*), *>* o f1(*), *<* (ver (21) y (63)).

La sección de cruce diferencial


(2.61)

muestra dos tipos de oscilaciones, como se ilustra en la Fig. 6.

Existen oscilaciones lentas en I(*) como una función de *, debidas a la
interferencia entre f2(*) y f3(*), controlada por la diferencia de fase *0
constante , entonces la separación angular entre los máximos sucesivos es

(2.62)

La interferencia de f1 con f2 y f1 con f3, superimpone mucho más rápidas
oscilaciones en este patrón de arcoiris supernumerable.

La vecindad del ángulo arcoiris *=* requiere un tratamiento especial, como
los puntos de fase estacionaria en l2 y l3 se juntan y f2(*) y f3(*) no
pueden ser tratados separadamente. Discutiremos esto en el siguiente
párrafo. Como vimos la amplitud del esparcimiento arcoiris, fm(*), se
extiende en la región *>*, entonces debido a esto también hay solamente un
punto de fase estacionaria en esa región, en l = lo correspondiente a la
amplitud fo(*), la sección de cruce diferenial

(2.63)

también muestra oscilaciones de interferencia, tiñendo fuera conforme * se
incrementa.



6 ESPARCIMIENTO ARCOIRIS

En e punto l = lm(b = bm), la función de deflexión clásica está en un mínimo
y puede ser expresda de la siguiente manera:


(64)

Usando la relación de equivalencia (45) vemos que para l cercano a lm


(65)

de donde se encuentra que (con * = -*)

(66a)

donde

(66b)

Entonces de (49)

(67a)

con


(67b)

La integral en (67a) puede expresarse en términos de la función de Airy
Ai(x), donde

(68)

Esta función decae exponencialmente para x>0 y oscila para x<0, con la forma
asintótica

(69a)

(69b)

desde (67a) y (68)

(70)


Para *>*m, la interferencia entre fm(*) y fo(*) produce oscilaciones, la
amplitud del cual decrece exponencialmente con el incremento del ángulo (ver
Fig. 6). Para *<*m la amplitud fm(*) oscila y reproduce el arcoiris
supernumerario (supernumerary rainbow), el cual puede ser descrito
alternativamente debido a la interacción entre f2(*) y f3(*). De hecho una
aproximación sin provar para fm(*) debida a Berry(1966) reproduce
exactamente el resultado fm(*) = f2(*) + f3(*), para valores de * menores
que *m


7 ORBITACIÓN.






Attachment: trabajo1.txt (1 KB)    [ Download ]



DINÁMICA MOLECULAR

ECUACIÓN DE MOVIMIENTO PARA SISTEMAS ATÓMICOS

En el capítulo se trata con las técnicas usadas para resolver las ecuaciones
clásicas de moviiento para un sistema de N moléculas interactuando vía un
potencial V como el de la ecuacion (1.4). Estas ecuaciones pueden escribirse
de diferentes maneras. La manera más apropiada es la ecuación de movimiento
de Lagrange

L = H-V

Con la función de Lagrange definida como L(q,dq/dt), se define en terminos
de la energia potencial y cinética, dependiente de coordenadas generalizadas
q

Si consideramos un sistema de átomos, con coordenadas cartesianas ri y las
definiciones usuales de H y V, entonces rtenemos:

mi dri/dt(dri/dt) = fi.

donde mi, es la mas a del átomo i y

fi = dL/dt es la fuerza en el átomo.
Esta ecuaciones también se aplican al marco de centro de masa, con fi
representando la fuerza total sobre la molécula i.

















Attachment: MC segunda prueba.txt (2 KB)    [ Download ]

[roberto@hdom01 MAESTRIA]$ ./canonico
enter file
final.dat
file final.dat
Enter random number integer
2937484
iimc version 0.1
Montecarlo simulation of Lennard-Jones atoms
Periodic Boundaries in all directions
HECTOR DOMINGUEZ
Enter file to keep last running data
final2c.dat
file final2c.dat
Enter file to keep g(r) data
grfilc2.dat
file grfilc2.dat
Enter max. displ. par.
0.3
Enter number of blocks
10
Enter number of cycles
500
Enter interval for update of max. displ.
10
Enter temperature
Interrupt
[roberto@hdom01 MAESTRIA]$ ./canonico
enter file
final.dat
file final.dat
Enter random number integer
2937484
iimc version 0.1
Montecarlo simulation of Lennard-Jones atoms
Periodic Boundaries in all directions
HECTOR DOMINGUEZ
Enter file to keep last running data
finalc2.dat
file finalc2.dat
Enter file to keep g(r) data
grfilc2.dat
file grfilc2.dat
Enter max. displ. par.
0.3
Enter number of blocks
100
Enter number of cycles
5000
Enter interval for update of max. displ.
10
Enter temperature
0.7
Enter potential cutoff distance
3.5
No. points in distr.func. = 100
Thickness for g(r) bins = 0.05
Number of blocks = 100
Number of cycles = 5000
Ratio update interval for atoms = 10
Maximum displacement = 0.3
initial temperature = 0.7
Potential cutoff distance = 3.5
-- Virial --= -970.579174
Initial values
# Part. = 500
Potential = -3.6020609
Total eng = -2.5520609
Temperature = 0.7
Density = 0.5
Pressure = -0.620579174


start of Markov Chain


cycle Potential pressure
1 -4.1561 -0.3940
2 -4.4919 -0.2639


Attachment: buenoresult.txt (4 KB)    [ Download ]

[roberto@hdom01 MAESTRIA]$ ./coulomb
enter file
titoe.dat
file titoe.dat
Enter templating option
1) Fluid 1 with non-zero velocities
2) Fluid 1 with zero velocities (frozen molecules)
1
-------------
Couloumb energy= -31.353118kcal/mol
Couloumb energy= -0.213479327/KT
vad de waal en.= 2.16039057kcal/mol
vad de waal en.= 0.0147098202/KT
md version 0.1
Molecular Dynamics of soft atoms with electrostatic
interactions.
If Templating is on, then the first n1 particles are
frozen. Periodic Boundaries in all directions
Option of having diffusion coefficients
HECTOR DOMINGUEZ --- March 2002 ---
Enter file to keep last running data
titog.dat
file titog.dat
Enter file to keep g(r), pair correl. func. data
titog1.dat
file titog1.dat
Enter number of blocks
10
Enter number of timesteps per block
20
Enter timestep (ps)
.002
Enter constant temperature option
.true.
Enter required temperature (Kelvin)
303
Enter potential cutoff distance (A)
7.8750E+01
Enter LJ epsilon(J/KT), sigma(A) for 1-1 fluid inter.
0.49207,3.743
Enter LJ epsilon(J/KT), sigma(A) for 1-2 fluid inter.
0.49207,3.743
Enter LJ epsilon(J/KT), sigma(A) for 2-2 fluid inter.
0.49207,3.743
Enter mass 1 and mass 2 (uma)
16.04,16.04
Enter lb factor for electrostatic (e*e/4*pi*eps*k*T)
10.350825
Enter kxm,kym,kzm in ewald sum and k-factor
4,4,4,2.5571E-02
Do you want diffusion
1) yes, 2) no
2
point in g(r) distr. func = 100.
Number of blocks = 10
Number of cycles = 20
Timestep = 0.002
Constant temperature option = T
initial temperature = 303.
Potential cutoff distance = 78.75
Epsilon and sigma for the 1-1 = 0.49207 3.743
Epsilon and sigma for the 1-2 = 0.49207 3.743
Epsilon and sigma for the 2-2 = 0.49207 3.743
Mass of 1 and Mass of 2 = 16.04 16.04
kxm,kym,kzm,kf. for Ewald = 4 4 4 0.025571
--- MIXTURE OF + and - CHARGES ---
Initial values
N1 = 124
N2 = 124
Density of 1= 3.17359417E-05(N/A3)
Density of 2= 3.17359417E-05(N/A3)
Energy = 1.48225397(J/KT)
Kinetic = 1.5(J/KT)
Potential = -0.0177460296(J/KT)
coulumbic = -0.350127301(J/KT)
Temperature = 298.735037(K)
Pressure = 0.00227924356(Kbar)
Volume = 3907241.87(A3)
Block Kinetic Coulomb Potential Momentum Temp Press
J/NKT J/NKT J/NKT Kg-m/Ns K Kbar
1 1.5000 -0.3484 -0.0171 0.0040 303.0000 0.0023
2 1.5000 -0.3457 -0.0164 0.0040 303.0000 0.0023
3 1.5000 -0.3441 -0.0162 0.0040 303.0000 0.0023
4 1.5000 -0.3432 -0.0165 0.0040 303.0000 0.0023
5 1.5000 -0.3431 -0.0170 0.0040 303.0000 0.0023
6 1.5000 -0.3436 -0.0175 0.0040 303.0000 0.0023
7 1.5000 -0.3448 -0.0179 0.0040 303.0000 0.0023
8 1.5000 -0.3464 -0.0176 0.0040 303.0000 0.0024
9 1.5000 -0.3482 -0.0166 0.0040 303.0000 0.0024
10 1.5000 -0.3499 -0.0157 0.0040 303.0000 0.0024
-------------------------------------------------------
1.5000 -0.3457 -0.0169 0.0040 303.0000 0.0023
-------------------------------------------------------
** fluctation values **
0.0000 0.0007 0.0000 303.0000 0.0000
Final values
# Part. fl-1= 124
# Part. fl-2= 124
Potential = -0.0159187354
coulumbic = -0.350594784
Total eng = 1.48408126
Temperature = 303.
Final rcut = 78.75
Density fl-1= 3.17359417E-05
Density fl-2= 3.17359417E-05
pressure = 0.00243153334
Real thickness in distr. func. = 0.7875173



Attachment: manual canonico.txt (0 KB)    [ Download ]




INBSTRUCCIONES PARA INSERTAR EN CANONICO

./canonico

final.dat

interger numeros de 8 a 9 dígitos
-out1.dat

-g(r) función de correlación

-parámetro de máximo de numero

-0.3 buen número

- númnero de bloques 50 000 a 100 000 ? apoco, con 500 esta bien

-número de ciclos 1000 ciclos

intervalo- 10

En temperatura absoluta - mayor a 1.2

distancia al potencial : 3.5 a 4

tener cuidado que el radio de corte no sea más grande
que la mitad de la longitud de la caja






Attachment: manualcoulomb.txt (2 KB)    [ Download ]

[roberto@hdom01 MAESTRIA]$ ./coulomb
enter file
titoe.dat
file titoe.dat
Enter templating option
1) Fluid 1 with non-zero velocities
2) Fluid 1 with zero velocities (frozen molecules)
1
-------------
Couloumb energy= -31.353118kcal/mol
Couloumb energy= -0.213479327/KT
vad de waal en.= 2.16039057kcal/mol
vad de waal en.= 0.0147098202/KT
md version 0.1
Molecular Dynamics of soft atoms with electrostatic
interactions.
If Templating is on, then the first n1 particles are
frozen. Periodic Boundaries in all directions
Option of having diffusion coefficients
HECTOR DOMINGUEZ --- March 2002 ---
Enter file to keep last running data
titog.dat
file titog.dat
Enter file to keep g(r), pair correl. func. data
titog1.dat
file titog1.dat
Enter number of blocks
10
Enter number of timesteps per block
20
Enter timestep (ps)
.002
Enter constant temperature option
.true.
Enter required temperature (Kelvin)
303
Enter potential cutoff distance (A)
7.8|750E+01
Enter LJ epsilon(J/KT), sigma(A) for 1-1 fluid inter.
0.49207,3.743
Enter LJ epsilon(J/KT), sigma(A) for 1-2 fluid inter.
0.49207,3.743
Enter LJ epsilon(J/KT), sigma(A) for 2-2 fluid inter.
0.49207,3.743
Enter mass 1 and mass 2 (uma)
16.04/16.04
Enter lb factor for electrostatic (e*e/4*pi*eps*k*T)
10.350825
Enter kxm,kym,kzm in ewald sum and k-factor
4,4,4,2.5571E-02
Do you want diffusion
1) yes, 2) no
2
point in g(r) distr. func = 100.
Number of blocks = 10
Number of cycles = 20
Timestep = 0.002
Constant temperature option = T
initial temperature = 303.
Potential cutoff distance = 7.8
Epsilon and sigma for the 1-1 = 0.49207 3.743
Epsilon and sigma for the 1-2 = 0.49207 3.743
Epsilon and sigma for the 2-2 = 0.49207 3.743
Mass of 1 and Mass of 2 = 16.04 0.
kxm,kym,kzm,kf. for Ewald = 4 4 4 0.025571
--- MIXTURE OF + and - CHARGES ---
Initial values
N1 = 124
N2 = 124
Density of 1= 3.17359417E-05(N/A3)
Density of 2= 3.17359417E-05(N/A3)
Energy = NAN(J/KT)
Kinetic = NAN(J/KT)
Potential = -0.015936583(J/KT)
coulumbic = -0.24717578(J/KT)
Temperature = NAN(K)
Pressure = NAN(Kbar)
Volume = 3907241.87(A3)
Block Kinetic Coulomb Potential Momentum Temp Press
J/NKT J/NKT J/NKT Kg-m/Ns K Kbar




Attachment: prueba1.txt (2 KB)    [ Download ]

Interrupt
[roberto@hdom01 MAESTRIA]$ ./canonico
enter file
final.dat
file final.dat
Enter random number integer
7
iimc version 0.1
Montecarlo simulation of Lennard-Jones atoms
Periodic Boundaries in all directions
HECTOR DOMINGUEZ
Enter file to keep last running data
out12.dat
file out12.dat
Enter file to keep g(r) data
out13.dat
file out13.dat
Enter max. displ. par.
0.3
Enter number of blocks
10
Enter number of cycles
10
Enter interval for update of max. displ.
1
Enter temperature
1.2
Enter potential cutoff distance
3.5
No. points in distr.func. = 100
Thickness for g(r) bins = 0.05
Number of blocks = 10
Number of cycles = 10
Ratio update interval for atoms = 1
Maximum displacement = 0.3
initial temperature = 1.2
Potential cutoff distance = 3.5
-- Virial --= -970.579174
Initial values
# Part. = 500
Potential = -3.6020609
Total eng = -1.8020609
Temperature = 1.2
Density = 0.5
Pressure = -0.370579174


start of Markov Chain


cycle Potential pressure
1 -3.4528 -0.0164
2 -3.3477 0.1299
3 -3.3400 0.1890
4 -3.3099 0.1418
5 -3.3188 0.1437
6 -3.2694 0.2797
7 -3.3266 0.0817
8 -3.3132 0.1270
9 -3.2858 0.1516
10 -3.3025 0.1775
** run values **
-3.3267 0.1405
** fluctation values **
0.0563 0.1131
Final values
# Particles = 500
Potential = -3.30932227
Total eng = -1.50932227
Temperature = 1.2
pressure = 0.276037918
[roberto@hdom01 MAESTRIA]$



Attachment: prueba1DM.txt (4 KB)    [ Download ]

[roberto@hdom01 MAESTRIA]$ ./coulomb
enter file
titoe.dat
file titoe.dat
Enter templating option
1) Fluid 1 with non-zero velocities
2) Fluid 1 with zero velocities (frozen molecules)
1
-------------
Couloumb energy= -31.353118kcal/mol
Couloumb energy= -0.213479327/KT
vad de waal en.= 2.16039057kcal/mol
vad de waal en.= 0.0147098202/KT
md version 0.1
Molecular Dynamics of soft atoms with electrostatic
interactions.
If Templating is on, then the first n1 particles are
frozen. Periodic Boundaries in all directions
Option of having diffusion coefficients
HECTOR DOMINGUEZ --- March 2002 ---
Enter file to keep last running data
titog.dat
file titog.dat
Enter file to keep g(r), pair correl. func. data
titog1.dat
file titog1.dat
Enter number of blocks
1000
Enter number of timesteps per block
20
Enter timestep (ps)
.002
Enter constant temperature option
.true.
Enter required temperature (Kelvin)
303
Enter potential cutoff distance (A)
7.8750E+01
Enter LJ epsilon(J/KT), sigma(A) for 1-1 fluid inter.
0.49207,3.743
Enter LJ epsilon(J/KT), sigma(A) for 1-2 fluid inter.
0.49207,3.743
Enter LJ epsilon(J/KT), sigma(A) for 2-2 fluid inter.
0.49207,3.743
Enter mass 1 and mass 2 (uma)
16.04,16.04
Enter lb factor for electrostatic (e*e/4*pi*eps*k*T)
10.350825
Enter kxm,kym,kzm in ewald sum and k-factor
4,4,4,2.5571E-02
Do you want diffusion
1) yes, 2) no
2
point in g(r) distr. func = 100.
Number of blocks = 1000
Number of cycles = 20
Timestep = 0.002
Constant temperature option = T
initial temperature = 303.
Potential cutoff distance = 78.75
Epsilon and sigma for the 1-1 = 0.49207 3.743
Epsilon and sigma for the 1-2 = 0.49207 3.743
Epsilon and sigma for the 2-2 = 0.49207 3.743
Mass of 1 and Mass of 2 = 16.04 16.04
kxm,kym,kzm,kf. for Ewald = 4 4 4 0.025571
--- MIXTURE OF + and - CHARGES ---
Initial values
N1 = 124
N2 = 124
Density of 1= 3.17359417E-05(N/A3)
Density of 2= 3.17359417E-05(N/A3)
Energy = 1.48225397(J/KT)
Kinetic = 1.5(J/KT)
Potential = -0.0177460296(J/KT)
coulumbic = -0.350127301(J/KT)
Temperature = 298.735037(K)
Pressure = 0.00227924356(Kbar)
Volume = 3907241.87(A3)
Block Kinetic Coulomb Potential Momentum Temp Press
J/NKT J/NKT J/NKT Kg-m/Ns K Kbar
1 1.5000 -0.3484 -0.0171 0.0040 303.0000 0.0023
2 1.5000 -0.3457 -0.0164 0.0040 303.0000 0.0023


RESULTADOS

996 1.5000 -0.3825 -0.0254 0.0040 303.0000 0.0024
997 1.5000 -0.3806 -0.0240 0.0041 303.0000 0.0024
998 1.5000 -0.3789 -0.0217 0.0041 303.0000 0.0024
999 1.5000 -0.3772 -0.0242 0.0041 303.0000 0.0024
1000 1.5000 -0.3757 -0.0275 0.0041 303.0000 0.0023
-------------------------------------------------------
1.5000 -0.3963 -0.0231 0.0040 303.0000 0.0024
-------------------------------------------------------
** fluctation values **
0.0000 0.0058 0.0000 303.0000 0.0000
Final values
# Part. fl-1= 124
# Part. fl-2= 124
Potential = -0.0280749931
coulumbic = -0.375318767
Total eng = 1.47192501
Temperature = 303.
Final rcut = 78.75
Density fl-1= 3.17359417E-05
Density fl-2= 3.17359417E-05
pressure = 0.00229995958
Real thickness in distr. func. = 0.7875173
enter file





Attachment: prueba1MC.txt (1 KB)    [ Download ]

[roberto@hdom01 MAESTRIA]$ ./canonico
enter file
final.dat
file final.dat
Enter random number integer
765342739
iimc version 0.1
Montecarlo simulation of Lennard-Jones atoms
Periodic Boundaries in all directions
HECTOR DOMINGUEZ
Enter file to keep last running data
out1.dat
file out1.dat
Enter file to keep g(r) data
out2.dat
file out2.dat
Enter max. displ. par.
0.3
Enter number of blocks
1000
Enter number of cycles
20
Enter interval for update of max. displ.
10
Enter temperature
303
Enter potential cutoff distance
7.8750E+01
No. points in distr.func. = 100
Thickness for g(r) bins = 0.05
Number of blocks = 1000
Number of cycles = 20
Ratio update interval for atoms = 10
Maximum displacement = 0.3
initial temperature = 303.
Potential cutoff distance = 78.75
-- Virial --= -1047.60696
Initial values
# Part. = 500
Potential = -3.77735828
Total eng = 450.722642
Temperature = 303.
Density = 0.5
Pressure = 150.452393


start of Markov Chain


cycle Potential pressure
1 28.2289 221.0384





resultados
Final values
# Particles = 500
Potential = 28.8529239
Total eng = 483.352924
Temperature = 303.
pressure = 222.019915
[roberto@hdom01 MAESTRIA]$


  

COMPUTER SIMULATION OF LIQUIDS, M.P. ALLEN, montecarlo

[roberto@nautilus tools]$ rpm
   RPM version 4.0.4
   Copyright (C) 1998-2000 - Red Hat, Inc.
   This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm {--help}
rpm {--version}
[roberto@nautilus tools]$ rpm nmap*.rpm
   RPM version 4.0.4
   Copyright (C) 1998-2000 - Red Hat, Inc.
   This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm {--help}
rpm {--version}
[roberto@nautilus tools]$ rpm --help
Usage: rpm [OPTION...]

   Query options (with -q or --query):
   -c, --configfiles                list all configuration files
   -d, --docfiles                   list all documentation files
   --dump                           dump basic file information
   -l, --list                       list files in package
   --queryformat=QUERYFORMAT        use the following query format
-s, --state                      display the states of the listed files
-v, --verbose                    display a verbose file listing
-a, --all                        query/verify all packages
-f, --file                       query/verify package(s) owning file
-g, --group                      query/verify package(s) in group
-p, --package                    query/verify a package file (i.e. a binary
*.rpm file)
--querytags                      display known query tags
--specfile                       query a spec file
--whatrequires                   query/verify the package(s) which require a
dependency
--whatprovides                   query/verify the package(s) which provide a
dependency

Verify options (with -V or --verify):
--nomd5[|=0x1]                   don't verify MD5 digest of files
   --nofiles[|=0x10000]             don't verify files in package
   --nodeps[|=0x20000]              don't verify package dependencies
   --noscript[|=0x40000]            don't execute %verifyscript (if any)
   -a, --all                        query/verify all packages
   -f, --file                       query/verify package(s) owning file
   -g, --group                      query/verify package(s) in group
   -p, --package                    query/verify a package file (i.e. a binary
*.rpm file)
   --querytags                      display known query tags
   --specfile                       query a spec file
   --whatrequires                   query/verify the package(s) which require a
   dependency
   --whatprovides                   query/verify the package(s) which provide a
   dependency

   Signature options:
   --addsign                        add a signature to a package
   --resign                         sign a package (discard current signature)
   -K, --checksig                   verify package signature
   --nogpg[&=~0x4]                  skip any GPG signatures
--nomd5[&=~0x2]                  do not verify file md5 checksums

  Database options:
  --initdb                         initialize database
  --rebuilddb                      rebuild database inverted lists from
  installed package headers

  Install/Upgrade/Erase options:
  --allfiles[|=0x40]               install all files, even configurations
which might otherwise be skipped
--allmatches[|=0x2]              remove all packages which match <package>
(normally an error is generated if
<package> specified multiple packages)
--badreloc[|=0x8]                relocate files in non-relocateable package
-e, --erase=<package>+           erase (uninstall) package
--excludedocs[|=0x20]            do not install documentation
--excludepath=<path>             skip files with leading component <path>
--force[|=0x74]                  short hand for --replacepkgs --replacefiles
 -F, --freshen=<packagefile>+     upgrade package(s) if already installed
-h, --hash[|=0x2]                print hash marks as package installs (good
with -v)
--ignorearch[|=0x2]              don't verify package architecture
   --ignoreos[|=0x1]                don't verify package operating system
   --ignoresize[|=0x180]            don't check disk space before installing
   --includedocs                    install documentation
   --install=<packagefile>+         install package
--justdb[|=0x8]                  update the database, but do not modify the
filesystem
--nodeps                         do not verify package dependencies
--noorder[|=0x8]                 do not reorder package installation to
satisfy dependencies
--noscripts[|=0xff0000]          do not execute package scriptlet(s)
--notriggers[|=0x990000]         do not execute any scriptlet(s) triggered
  by this package
  --oldpackage[|=0x40]             upgrade to an old version of the package
 (--force on upgrades does this
  automatically)
 --percent[|=0x1]                 print percentages as package installs
 --prefix=<dir>                   relocate the package to <dir>, if
relocatable
--relocate=<old>=<new>           relocate files from path <old> to <new>
  --repackage[|=0x400]             save erased package files by repackaging
--replacefiles[|=0x30]           install even if the package replaces
 installed files
 --replacepkgs[|=0x4]             reinstall if the package is already present
--test[|=0x1]                    don't install, but tell if it would work or
   not
   -U, --upgrade=<packagefile>+     upgrade package(s)

Common options for all rpm modes:
--version                        print the version of rpm being used
--quiet                          provide less detailed output
-v, --verbose                    provide more detailed output
--define='<name> <body>'         define macro <name> with value <body>
 --eval=<expr>+                   print macro expansion of <expr>+
-r, --root=<dir>                 use <dir> as the top level directory
(default: "/")
--macros=<file:...>              read <file:...> instead of default macro
file(s)
--rcfile=<file:...>              read <file:...> instead of default rpmrc
file(s)
--showrc                         display final rpmrc and macro configuration

Options implemented via popt alias/exec:
--scripts                        list install/erase scriptlets from
package(s)
--setperms                       set permissions of files in a package
--setugids                       set user/group ownership of files in a
package
--conflicts                      list capabilities this package conflicts
with
--obsoletes                      list other packages removed by installing
this package
--provides                       list capabilities that this package provides
--requires                       list capabilities required by package(s)
--info                           list descriptive information from package(s)
--changelog                      list change logs for this package
--triggers                       list trigger scriptlets from package(s)
--last                           list package(s) by install time, most
recent first
--filesbypkg                     list all files from each package
--redhatprovides                 find package name that contains a provided
capability (needs rpmdb-redhat package
installed)
--redhatrequires                 find package name that contains a required
capability (needs rpmdb-redhat package
installed)
--buildpolicy=<policy>           set buildroot <policy> (e.g. compress man
  pages)
  --with=<option>                  enable configure <option> for build
 --without=<option>               disable configure <option> for build

Help options:
-?, --help                       Show this help message
--usage                          Display brief usage message


unexpected token `file)'
[roberto@nautilus tools]$   --querytags                      display known query tags
bash: --querytags: command not found
[roberto@nautilus tools]$   --specfile                       query a spec file
bash: --specfile: command not found
[roberto@nautilus tools]$   --whatrequires                   query/verify the package(s) which require a
bash: syntax error near unexpected token `package(s'
[roberto@nautilus tools]$                                    dependency
bash: dependency: command not found
[roberto@nautilus tools]$   --whatprovides                   query/verify the package(s) which provide a
bash: syntax error near unexpected token `package(s'
[roberto@nautilus tools]$                                    dependency
bash: dependency: command not found
[roberto@nautilus tools]$
[roberto@nautilus tools]$ Signature options:
bash: Signature: command not found
[roberto@nautilus tools]$   --addsign                        add a signature to a package
bash: --addsign: command not found
[roberto@nautilus tools]$   --resign                         sign a package (discard current signature)
bash: syntax error near unexpected token `(d'
[roberto@nautilus tools]$   -K, --checksig                   verify package signature
bash: -K,: command not found
[roberto@nautilus tools]$   --nogpg[&=~0x4]                  skip any GPG signatures
bash: --nogpg[: command not found
[1] 10542
bash: =~0x4]: command not found
[1]+  Exit 127                --nogpg[
[roberto@nautilus tools]$   --nomd5[&=~0x2]                  do not verify file md5 checksums
bash: --nomd5[: command not found
[1] 10544
bash: =~0x2]: command not found
[1]   Exit 127                --nomd5[
[roberto@nautilus tools]$
[roberto@nautilus tools]$ Database options:
bash: Database: command not found
[roberto@nautilus tools]$   --initdb                         initialize database
bash: --initdb: command not found
[roberto@nautilus tools]$   --rebuilddb                      rebuild database inverted lists from
bash: --rebuilddb: command not found
[roberto@nautilus tools]$                                    installed package headers
bash: installed: command not found
[roberto@nautilus tools]$
[roberto@nautilus tools]$ Install/Upgrade/Erase options:
bash: Install/Upgrade/Erase: No such file or directory
[roberto@nautilus tools]$   --allfiles[|=0x40]               install all files, even configurations
bash: --allfiles[: command not found
bash: =0x40]: command not found
[roberto@nautilus tools]$                                    which might otherwise be skipped
/usr/bin/which: no might in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
/usr/bin/which: no otherwise in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
/usr/bin/which: no be in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
/usr/bin/which: no skipped in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
[roberto@nautilus tools]$   --allmatches[|=0x2]              remove all packages which match <package>
bash: syntax error near unexpected token `<package>'
[roberto@nautilus tools]$                                    (normally an error is generated if
>                                    <package> specified multiple packages)
bash: normally: command not found
bash: package: No such file or directory
[roberto@nautilus tools]$   --badreloc[|=0x8]                relocate files in non-relocateable package
bash: --badreloc[: command not found
bash: =0x8]: command not found
[roberto@nautilus tools]$   -e, --erase=<package>+           erase (uninstall) package
bash: syntax error near unexpected token `(u'
[roberto@nautilus tools]$   --excludedocs[|=0x20]            do not install documentation
bash: --excludedocs[: command not found
bash: =0x20]: command not found
[roberto@nautilus tools]$   --excludepath=<path>             skip files with leading component <path>
bash: syntax error near unexpected token `<path>'
[roberto@nautilus tools]$   --force[|=0x74]                  short hand for --replacepkgs --replacefiles
bash: --force[: command not found
bash: =0x74]: command not found
[roberto@nautilus tools]$   -F, --freshen=<packagefile>+     upgrade package(s) if already installed
bash: syntax error near unexpected token `package(s'
[roberto@nautilus tools]$   -h, --hash[|=0x2]                print hash marks as package installs (good
bash: syntax error near unexpected token `(g'
[roberto@nautilus tools]$     ed output
output: No such file or directory

?
[roberto@nautilus tools]$ who
roberto  pts/0    Jun 20 18:29
[roberto@nautilus tools]$ ls
dumpacl.zip             john-16w.zip    nmap-2.53-1.i386.rpm         pwdump2.zip
firewalk-0.99.1.tar.gz  lc3setup01.exe  nvx005.zip                   sid.zip
foundstone tools        Mis documentos  pandora_linux_v4.0_b2.1.tgz  thcscan.zip
icmpquery.c.txt         Mis imágenes    pan_online_95_b2.zip         whisker.zip
john-1.6.tar.gz         nessus          pan_online_nt_b2.zip
[roberto@nautilus tools]$ tar
tar: You must specify one of the `-Acdtrux' options
Try `tar --help' for more information.
[roberto@nautilus tools]$ tar --help
GNU `tar' saves many files together into a single tape or disk archive, and
can restore individual files from the archive.

Usage: tar [OPTION]... [FILE]...

Examples:
  tar -cf archive.tar foo bar  # Create archive.tar from files foo and bar.
  tar -tvf archive.tar         # List all files in archive.tar verbosely.
  tar -xf archive.tar          # Extract all files from archive.tar.

If a long option shows an argument as mandatory, then it is mandatory
for the equivalent short option also.  Similarly for optional arguments.

Main operation mode:
  -t, --list              list the contents of an archive
  -x, --extract, --get    extract files from an archive
  -c, --create            create a new archive
  -d, --diff, --compare   find differences between archive and file system
  -r, --append            append files to the end of an archive
  -u, --update            only append files newer than copy in archive
  -A, --catenate          append tar files to an archive
      --concatenate       same as -A
      --delete            delete from the archive (not on mag tapes!)

Operation modifiers:
  -W, --verify               attempt to verify the archive after writing it
      --remove-files         remove files after adding them to the archive
  -k, --keep-old-files       don't replace existing files when extracting
      --overwrite            overwrite existing files when extracting
      --overwrite-dir        overwrite directory metadata when extracting
  -U, --unlink-first         remove each file prior to extracting over it
      --recursive-unlink     empty hierarchies prior to extracting directory
  -S, --sparse               handle sparse files efficiently
  -O, --to-stdout            extract files to standard output
  -G, --incremental          handle old GNU-format incremental backup
  -g, --listed-incremental=FILE
                             handle new GNU-format incremental backup
      --ignore-failed-read   do not exit with nonzero on unreadable files

Handling of file attributes:
      --owner=NAME             force NAME as owner for added files
      --group=NAME             force NAME as group for added files
      --mode=CHANGES           force (symbolic) mode CHANGES for added files
      --atime-preserve         don't change access times on dumped files
  -m, --modification-time      don't extract file modified time
      --same-owner             try extracting files with the same ownership
      --no-same-owner          extract files as yourself
      --numeric-owner          always use numbers for user/group names
  -p, --same-permissions       extract permissions information
      --no-same-permissions    do not extract permissions information
      --preserve-permissions   same as -p
  -s, --same-order             sort names to extract to match archive
      --preserve-order         same as -s
      --preserve               same as both -p and -s

Device selection and switching:
  -f, --file=ARCHIVE             use archive file or device ARCHIVE
      --force-local              archive file is local even if has a colon
      --rsh-command=COMMAND      use remote COMMAND instead of rsh
  -[0-7][lmh]                    specify drive and density
  -M, --multi-volume             create/list/extract multi-volume archive
  -L, --tape-length=NUM          change tape after writing NUM x 1024 bytes
  -F, --info-script=FILE         run script at end of each tape (implies -M)
      --new-volume-script=FILE   same as -F FILE
      --volno-file=FILE          use/update the volume number in FILE

Device blocking:
  -b, --blocking-factor=BLOCKS   BLOCKS x 512 bytes per record
      --record-size=SIZE         SIZE bytes per record, multiple of 512
  -i, --ignore-zeros             ignore zeroed blocks in archive (means EOF)
  -B, --read-full-records        reblock as we read (for 4.2BSD pipes)

Archive format selection:
  -V, --label=NAME                   create archive with volume name NAME
              PATTERN                at list/extract time, a globbing PATTERN
  -o, --old-archive, --portability   write a V7 format archive
      --posix                        write a POSIX format archive
  -j, --bzip2                        filter the archive through bzip2
  -z, --gzip, --ungzip               filter the archive through gzip
  -Z, --compress, --uncompress       filter the archive through compress
      --use-compress-program=PROG    filter through PROG (must accept -d)

Local file selection:
  -C, --directory=DIR          change to directory DIR
  -T, --files-from=NAME        get names to extract or create from file NAME
      --null                   -T reads null-terminated names, disable -C
      --exclude=PATTERN        exclude files, given as a PATTERN
  -X, --exclude-from=FILE      exclude patterns listed in FILE
      --anchored               exclude patterns match file name start (default)
      --no-anchored            exclude patterns match after any /
      --ignore-case            exclusion ignores case
      --no-ignore-case         exclusion is case sensitive (default)
      --wildcards              exclude patterns use wildcards (default)
      --no-wildcards           exclude patterns are plain strings
      --wildcards-match-slash  exclude pattern wildcards match '/' (default)
      --no-wildcards-match-slash exclude pattern wildcards do not match '/'
  -P, --absolute-names         don't strip leading `/'s from file names
  -h, --dereference            dump instead the files symlinks point to
      --no-recursion           avoid descending automatically in directories
  -l, --one-file-system        stay in local file system when creating archive
  -K, --starting-file=NAME     begin at file NAME in the archive
  -N, --newer=DATE             only store files newer than DATE
      --newer-mtime=DATE       compare date and time when data changed only
      --after-date=DATE        same as -N
      --backup[=CONTROL]       backup before removal, choose version control
      --suffix=SUFFIX          backup before removal, override usual suffix

Informative output:
      --help            print this help, then exit
      --version         print tar program version number, then exit
  -v, --verbose         verbosely list files processed
      --checkpoint      print directory names while reading the archive
      --totals          print total bytes written while creating archive
  -R, --block-number    show block number within archive with each message
  -w, --interactive     ask for confirmation for every action
      --confirmation    same as -w

The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control may be set with --backup or VERSION_CONTROL, values are:

  t, numbered     make numbered backups
  nil, existing   numbered if numbered backups exist, simple otherwise
  never, simple   always make simple backups

GNU tar cannot read nor produce `--posix' archives.  If POSIXLY_CORRECT
is set in the environment, GNU extensions are disallowed with `--posix'.
Support for POSIX is only partially implemented, don't count on it yet.
ARCHIVE may be FILE, HOST:FILE or USER@HOST:FILE; DATE may be a textual date
or a file name starting with `/' or `.', in which case the file's date is used.
*This* `tar' defaults to `-f- -b20'.

Report bugs to <bug-tar@gnu.org>.


#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>

main(int argc, const char *argv[]) {
u_long addr;
struct hostent *hp;
char **p;

if(argc !=2){
printf("uso: %s dirección-IP\n", argv[0]);
exit(1);
}

if((addr =inet_addr(argv[1]))==-1){
printf("La dirección IP tiene que estar en notación de punto: a.b.c.d \n");
exit(2);
}
hp = gethostbyaddr((char *)&addr, sizeof (addr), AF_INET);
if(hp==NULL){
printf("No encuentro información sobre la maquina %s\n", argv[1]);
exit(3);
}

for(p=hp->h_addr_list; *p != 0; p++){
struct in_addr in;
memcpy(&in.s_addr, *p, sizeof (in.s_addr));
printf("%s\t%s\n", inet_ntoa(in), hp->h_name);
}
exit(0);
}


************

C     Last change:  EES  26 Jun 2003    4:09 pm
program montecarlo1

integer seed

data seed/987654321/
data exact/.78540/

end program
***************

c*-*
c*-* Copyright (C) 2000 Massimo Marchi and Piero Procacci
c*-* Full copyright notice at http://www.chim.unifi.it/orac/copyright4.0.html
c*-* Contact for info M. Marchi, CEA,  Gif Sur Yvette 91191 (FRANCE) 
c*-* Email:marchi@villon.saclay.cea.fr
c*-* 
      subroutine pmesh_kspace_get_sizes(
     $     nfft1,nfft2,nfft3,numatoms,order,
     $     sizfftab,sizffwrk,siztheta,siz_Q,sizheap,sizstack)
      implicit none
      integer nfft1,nfft2,nfft3,numatoms,order,
     $     sizfftab,sizffwrk,siztheta,siz_Q,sizheap,sizstack

c INPUT  
c      nfft1,nfft2,nfft3,numatoms,order
c      nfft1,nfft2,nfft3 are the dimensions of the charge grid array
c      numatoms is number of atoms
c      order is the order of B-spline interpolation

c OUTPUT
c      sizfftab,sizffwrk,siztheta,siz_Q
c      sizfftab is permanent 3d fft table storage
c      sizffwrk is temporary 3d fft work storage
c      siztheta is size of arrays theta1-3 dtheta1-3
c      sizheap is total size of permanent storage
c      sizstack is total size of temporary storage


c This routine computes the above output parameters needed for 
c heap or stack allocation.

      integer nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork

      call get_fftdims(nfft1,nfft2,nfft3,
     $       nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork,
     $       sizfftab,sizffwrk)
      siztheta = numatoms*order
      siz_Q = 2*nfftdim1*nfftdim2*nfftdim3
      sizheap = nfft1+nfft2+nfft3+sizfftab
      sizstack = siz_Q+6*siztheta+sizffwrk+3*numatoms
C      write(6,*)'total HEAP storage needed = ',sizheap
C      write(6,*)'total STACK storage needed = ',sizstack
      return
      end
c----------------------------------------------------
      subroutine pmesh_kspace_setup(
     $    bsp_mod1,bsp_mod2,bsp_mod3,fftable,ffwork,
     $    nfft1,nfft2,nfft3,order,sizfftab,sizffwrk)
      implicit none

c  see DO_PMESH_KSPACE for explanation of arguments

      integer nfft1,nfft2,nfft3,order,sizfftab,sizffwrk
      double precision bsp_mod1(nfft1),bsp_mod2(nfft2),
     +   bsp_mod3(nfft3)
      double precision fftable(sizfftab),ffwork(sizffwrk)
   
      double precision dummy
      integer nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork,sfft,sffw

      call get_fftdims(nfft1,nfft2,nfft3,
     $       nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork,sfft,sffw)
      call load_bsp_moduli(bsp_mod1,bsp_mod2,bsp_mod3,
     $   nfft1,nfft2,nfft3,order)
      call fft_setup(dummy,fftable,ffwork,
     $      nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,
     $      nfftable,nffwork)
      return
      end
c----------------------------------------------------
      subroutine do_pmesh_kspace(
     $   numatoms,x,y,z,charge,recip,volume,ewald_coeff,
     $   order,nfft1,nfft2,nfft3,
     $   eer,dx,dy,dz,virial,
     $   sizfftab,sizffwrk,siztheta,siz_Q,
     $   bsp_mod1,bsp_mod2,bsp_mod3,fftable,
     $   Q,ffwork,theta1,theta2,theta3,dtheta1,dtheta2,dtheta3,
     $   fr1,fr2,fr3,rkcut)
      implicit none

c INPUT 
c       numatoms:  number of atoms
c       x,y,z:   atomic coords
c       charge  atomic charges
c       recip: 3x3 array of reciprocal unit cell vectors (stored as columns)
c       volume: the volume of the unit cell
c       ewald_coeff:   ewald convergence parameter
c       order: the order of Bspline interpolation. E.g. cubic is order 4
c          fifth degree is order 6 etc. The order must be an even number 
c          and at least 4.
c       nfft1,nfft2,nfft3: the dimensions of the charge grid array
      integer numatoms,order,nfft1,nfft2,nfft3
      double precision x(numatoms),y(numatoms),z(numatoms),
     $       charge(numatoms),recip(3,3),volume,ewald_coeff,rkcut

c OUTPUT
c       eer:  ewald reciprocal or k-space  energy
c       dx,dy,dz: forces incremented by k-space sum
c       virial:  virial due to k-space sum (valid for atomic scaling;
c                rigid molecule virial needs a correction term not
c                computed here
      double precision eer,dx(numatoms),dy(numatoms),dz(numatoms),
     $        virial(3,3)

c SIZES of some arrays
      integer   sizfftab,sizffwrk,siztheta,siz_Q


c HEAP STORAGE:  These arrays need to be preserved throughout simulation
      double precision bsp_mod1(nfft1),bsp_mod2(nfft2),
     $                 bsp_mod3(nfft3),fftable(sizfftab)
c STACK STORAGE: These arrays can be tossed after leaving this routine
      double precision Q(siz_Q),ffwork(sizffwrk),theta1(siztheta),
     $          theta2(siztheta),theta3(siztheta),dtheta1(siztheta),
     $          dtheta2(siztheta),dtheta3(siztheta),fr1(numatoms),
     $          fr2(numatoms),fr3(numatoms)

      integer nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork,sfft,sffw
c  get some integer array dimensions
      call get_fftdims(nfft1,nfft2,nfft3,
     $       nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork,sfft,sffw)
      
      call get_scaled_fractionals(
     $         numatoms,x,y,z,recip,nfft1,nfft2,nfft3,fr1,fr2,fr3)
      call get_bspline_coeffs(
     $         numatoms,fr1,fr2,fr3,order,
     $         theta1,theta2,theta3,dtheta1,dtheta2,dtheta3)
      call fill_charge_grid(
     $         numatoms,charge,theta1,theta2,theta3,fr1,fr2,fr3,order,
     $         nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,Q)
      call fft_back(
     $         Q,fftable,ffwork,nfft1,nfft2,nfft3,
     $         nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork)
      call scalar_sum(
     $         Q,ewald_coeff,volume,recip,bsp_mod1,bsp_mod2,bsp_mod3,
     $     nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,eer,virial,rkcut
     &     )
      call fft_forward(
     $         Q,fftable,ffwork,nfft1,nfft2,nfft3,
     $         nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork)
      call grad_sum(
     $         numatoms,charge,recip,theta1,theta2,theta3,
     $         dtheta1,dtheta2,dtheta3,dx,dy,dz,fr1,fr2,fr3,
     $         order,nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,Q)
      return
      end
c----------------------------------------------------------------------
      subroutine get_scaled_fractionals(
     $           numatoms,x,y,z,recip,nfft1,nfft2,nfft3,
     $           fr1,fr2,fr3)
      implicit none

c INPUT:
c      numatoms: number of atoms
c      x,y,z: arrays of cartesian coords
c      recip: the 3x3 array of reciprocal vectors stored as columns
c OUTPUT:
c     fr1,fr2,fr3 the scaled and shifted fractional coords

      integer numatoms,nfft1,nfft2,nfft3
      double precision x(numatoms),y(numatoms),z(numatoms),recip(3,3)
      double precision fr1(numatoms),fr2(numatoms),fr3(numatoms)

      integer n
      double precision w
      do 100 n = 1,numatoms
        w = x(n)*recip(1,1)+y(n)*recip(2,1)+z(n)*recip(3,1)
        fr1(n) = nfft1*(w - anint(w) + 0.5d0)
        w = x(n)*recip(1,2)+y(n)*recip(2,2)+z(n)*recip(3,2)
        fr2(n) = nfft2*(w - anint(w) + 0.5d0)
        w = x(n)*recip(1,3)+y(n)*recip(2,3)+z(n)*recip(3,3)
        fr3(n) = nfft3*(w - anint(w) + 0.5d0)
100   continue
      return
      end
c---------------------------------------------------------------
      subroutine load_bsp_moduli(bsp_mod1,bsp_mod2,bsp_mod3,
     $   nfft1,nfft2,nfft3,order)
      implicit none
      integer nfft1,nfft2,nfft3,order
      double precision bsp_mod1(nfft1),bsp_mod2(nfft2),
     +   bsp_mod3(nfft3)

      integer MAXORDER
      parameter (MAXORDER=25)
      integer MAXNFFT
      parameter (MAXNFFT=1000)
      double precision array(MAXORDER),darray(MAXORDER),w
      double precision bsp_arr(MAXNFFT)
      integer i,maxn

c this routine loads the moduli of the inverse DFT of the B splines
c bsp_mod1-3 hold these values, nfft1-3 are the grid dimensions,
c Order is the order of the B spline approx.

      if ( order .gt. MAXORDER )then
       write(6,*)'order too large! check on MAXORDER'
       stop
      endif
      maxn = max(nfft1,nfft2,nfft3)
      if ( maxn .gt. MAXNFFT )then 
       write(6,*)'nfft1-3 too large! check on MAXNFFT'
       stop
      endif
      w = 0.d0
      call fill_bspline(w,order,array,darray)
      do 100 i = 1,maxn
        bsp_arr(i) = 0.d0
100   continue
      do 150 i = 2,order+1
       bsp_arr(i) = array(i-1)
150   continue
      call DFTMOD(bsp_mod1,bsp_arr,nfft1)
      call DFTMOD(bsp_mod2,bsp_arr,nfft2)
      call DFTMOD(bsp_mod3,bsp_arr,nfft3)
      return
      end
c------------------------------------------------------------------------
      subroutine DFTMOD(bsp_mod,bsp_arr,nfft)
      implicit none
      integer nfft
      double precision bsp_mod(nfft),bsp_arr(nfft)
c Computes the modulus of the discrete fourier transform of bsp_arr,
c  storing it into bsp_mod

      integer j,k
      double precision sum1,sum2,twopi,arg,tiny
      twopi = 2.d0*3.14159265358979323846
      tiny = 1.d-7
      do 300 k = 1,nfft
       sum1 = 0.d0
       sum2 = 0.d0
       do 250 j = 1,nfft
         arg = twopi*(k-1)*(j-1)/nfft
         sum1 = sum1 + bsp_arr(j)*dcos(arg)
         sum2 = sum2 + bsp_arr(j)*dsin(arg)
250    continue
       bsp_mod(k) = sum1**2 + sum2**2
300   continue
      do 400 k = 1,nfft
       if ( bsp_mod(k) .lt. tiny )
     $     bsp_mod(k) = 0.5d0*(bsp_mod(k-1) + bsp_mod(k+1))
400   continue
      return
      end
c------------------------------------------------------------------------


      subroutine fill_charge_grid(
     $         numatoms,charge,theta1,theta2,theta3,fr1,fr2,fr3,
     $         order,nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,Q)
c---------------------------------------------------------------------
c INPUT:
c      numatoms:  number of atoms
c      charge: the array of atomic charges
c      theta1,theta2,theta3: the spline coeff arrays
c      fr1,fr2,fr3 the scaled and shifted fractional coords
c      nfft1,nfft2,nfft3: the charge grid dimensions
c      nfftdim1,nfftdim2,nfftdim3: physical charge grid dims
c      order: the order of spline interpolation
c OUTPUT:
c      Q the charge grid
c---------------------------------------------------------------------
      implicit none
      integer numatoms,order,nfft1,nfft2,nfft3
      integer nfftdim1,nfftdim2,nfftdim3
      double precision fr1(numatoms),fr2(numatoms),fr3(numatoms)
      double precision theta1(order,numatoms),theta2(order,numatoms),
     $     theta3(order,numatoms),charge(numatoms)
      double precision Q(2,nfftdim1,nfftdim2,nfftdim3)

      integer n,ntot,ith1,ith2,ith3,i0,j0,k0,i,j,k
      double precision prod
      ntot = 2*nfftdim1*nfftdim2*nfftdim3
      call clearQ(Q,ntot)

      do 300 n = 1,numatoms
        k0 = int(fr3(n)) - order
        do 200 ith3 = 1,order
         k0 = k0 + 1
         k = k0 + 1 + (nfft3 - isign(nfft3,k0))/2
         j0 = int(fr2(n)) - order
         do 150 ith2 = 1,order
          j0 = j0 + 1
          j = j0 + 1 + (nfft2 - isign(nfft2,j0))/2
          prod = theta2(ith2,n)*theta3(ith3,n)*charge(n)
          i0 = int(fr1(n)) - order
          do 100 ith1 = 1,order
           i0 = i0 + 1
           i = i0 + 1 + (nfft1 - isign(nfft1,i0))/2
           Q(1,i,j,k) = Q(1,i,j,k) + theta1(ith1,n) * prod
100       continue
150      continue
200     continue
300   continue
      return
      end
c-----------------------------------------------------------
      subroutine clearQ(Q,ntot)
      integer ntot
      double precision Q(ntot)
      integer i
      do 10 i = 1,ntot
        Q(i) = 0.d0
10    continue
      return
      end
c-----------------------------------------------------------
      subroutine grad_sum(
     $         numatoms,charge,recip,theta1,theta2,theta3,
     $         dtheta1,dtheta2,dtheta3,fx,fy,fz,fr1,fr2,fr3,
     $         order,nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,Q)
      implicit none
      integer numatoms,order,nfft1,nfft2,nfft3
      integer nfftdim1,nfftdim2,nfftdim3
      double precision recip(3,3)
      double precision fr1(numatoms),fr2(numatoms),fr3(numatoms)
      double precision fx(numatoms),fy(numatoms),fz(numatoms)
      double precision theta1(order,numatoms),theta2(order,numatoms),
     $     theta3(order,numatoms),charge(numatoms)
      double precision dtheta1(order,numatoms),dtheta2(order,numatoms),
     $     dtheta3(order,numatoms)
      double precision Q(2,nfftdim1,nfftdim2,nfftdim3)

      integer n,ith1,ith2,ith3,i0,j0,k0,i,j,k
      double precision f1,f2,f3,term

C$DOACROSS LOCAL(f1,f2,f3,k0,k,j0,j,i0,i,term,n,ith1,ith2,ith3),
C$&  SHARE(numatoms,fr1,fr2,fr3,charge,Q,fx,fy,fz,recip,order,
C$&   nfft1,nfft2,nfft3,theta1,theta2,theta3,dtheta1,dtheta2,dtheta3)
      do 400 n = 1,numatoms
        f1 = 0.d0
        f2 = 0.d0
        f3 = 0.d0
        k0 = int(fr3(n)) - order
        do 200 ith3 = 1,order
         k0 = k0 + 1
         k = k0 + 1 + (nfft3 - isign(nfft3,k0))/2
         j0 = int(fr2(n)) - order
         do 150 ith2 = 1,order
          j0 = j0 + 1
          j = j0 + 1 + (nfft2 - isign(nfft2,j0))/2
          i0 = int(fr1(n)) - order
          do 100 ith1 = 1,order
           i0 = i0 + 1
           i = i0 + 1 + (nfft1 - isign(nfft1,i0))/2
           term = charge(n)*Q(1,i,j,k)
c force is negative of grad
           f1 = f1 - nfft1 * term * dtheta1(ith1,n) *
     $          theta2(ith2,n) * theta3(ith3,n)
           f2 = f2 - nfft2 * term * theta1(ith1,n) *
     $          dtheta2(ith2,n) * theta3(ith3,n)
           f3 = f3 - nfft3 * term * theta1(ith1,n) *
     $          theta2(ith2,n) * dtheta3(ith3,n)
100       continue
150      continue
200     continue
        fx(n) = fx(n) + recip(1,1)*f1+recip(1,2)*f2+recip(1,3)*f3
        fy(n) = fy(n) + recip(2,1)*f1+recip(2,2)*f2+recip(2,3)*f3
        fz(n) = fz(n) + recip(3,1)*f1+recip(3,2)*f2+recip(3,3)*f3
400   continue
      return
      end

c-------------------------------------------------------------
      subroutine check_virial(self_ene,adj_ene,dir_ene,rec_ene,
     $       adj_vir,rec_vir,dir_vir)
      implicit none
      double precision self_ene,adj_ene,dir_ene,rec_ene
      double precision adj_vir(6),rec_vir(6),dir_vir(6)

      double precision etot,svir,relerr
      etot = self_ene+adj_ene+dir_ene+rec_ene
      svir = adj_vir(1)+rec_vir(1)+dir_vir(1)+
     $       adj_vir(4)+rec_vir(4)+dir_vir(4)+
     $       adj_vir(6)+rec_vir(6)+dir_vir(6)
      relerr = 2.d0*abs(etot+svir)/(abs(etot)+abs(svir))
      write(6,*)'tot ene =   ',etot
      write(6,*)'trace vir = ',svir
      write(6,*)'rel error = ',relerr
      return
      end
c-------------------------------------------------------------
      subroutine check_force(numatoms,
     $      fx1,fy1,fz1,fx2,fy2,fz2,fdx,fdy,fdz)
      integer numatoms
      double precision fx1(*),fy1(*),fz1(*),fx2(*),fy2(*),fz2(*),
     $      fdx(*),fdy(*),fdz(*)

      double precision rms_num,rms_den,rms
      integer i
      rms_num = 0.d0
      rms_den = 0.d0
      do 100 i = 1,numatoms
       rms_num = rms_num + (fx1(i)-fx2(i))**2 + (fy1(i)-fy2(i))**2 +
     $          (fz1(i)-fz2(i))**2
       rms_den = rms_den + fdx(i)**2 + fdy(i)**2 + fdz(i)**2
100   continue
      rms = dsqrt(rms_num/rms_den)
      write(6,*)'rms force err = ',rms
      return
      end
c-------------------------------------------------------------

      subroutine pubz3di(n1,n2,n3,table,ntable)
      implicit none
      integer n1,n2,n3,ntable
      double precision table(ntable,3)
c ntable should be 4*max(n1,n2,n3) +15


      call cffti(n1,table(1,1))
      call cffti(n2,table(1,2))
      call cffti(n3,table(1,3))

      return
      end
*****************************************************************************
      subroutine pubz3d(isign,n1,n2,n3,w,ld1,ld2,table,ntable,
     $    work,nwork)
      implicit none

      integer n1,n2,n3,ld1,ld2,isign,ntable,nwork
      double complex w(ld1,ld2,n3)
      double complex work( nwork)
      double precision table(ntable,3)

      integer i,j,k
c ntable should be 4*max(n1,n2,n3) +15
c nwork should be max(n1,n2,n3)
c
c   transform along X  first ...
c
      do 100 k = 1, n3
       do 90 j = 1, n2
        do 70 i = 1,n1
          work(i) = w(i,j,k)
70      continue
        if ( isign .eq. -1) call cfftf(n1,work,table(1,1))
        if ( isign .eq. 1) call cfftb(n1,work,table(1,1))
        do 80 i = 1,n1
          w(i,j,k) = work(i)
80      continue
90     continue
100   continue
c
c   transform along Y then ...
c
      do 200 k = 1,n3
       do 190 i = 1,n1
        do 170 j = 1,n2
          work(j) = w(i,j,k)
170     continue
        if ( isign .eq. -1) call cfftf(n2,work,table(1,2))
        if ( isign .eq. 1) call cfftb(n2,work,table(1,2))
        do 180 j = 1,n2
          w(i,j,k) = work(j)
180     continue
190    continue
200   continue
c
c   transform along Z finally ...
c
      do 300 i = 1, n1
       do 290 j = 1, n2
        do 270 k = 1,n3
          work(k) = w(i,j,k)
270     continue
        if ( isign .eq. -1) call cfftf(n3,work,table(1,3))
        if ( isign .eq. 1) call cfftb(n3,work,table(1,3))
        do 280 k = 1,n3
          w(i,j,k) = work(k)
280     continue
290    continue
300   continue

      return
      end
c----------------------------------------------------


C SPLINE

c---------------------------------------------------------------------
      subroutine get_bspline_coeffs(
     $           numatoms,fr1,fr2,fr3,order,
     $           theta1,theta2,theta3,dtheta1,dtheta2,dtheta3)
c---------------------------------------------------------------------
c INPUT:
c      numatoms: number of atoms
c      fr1,fr2,fr3 the scaled and shifted fractional coords
c      order: the order of spline interpolation
c OUTPUT
c      theta1,theta2,theta3: the spline coeff arrays
c      dtheta1,dtheta2,dtheta3: the 1st deriv of spline coeff arrays
c---------------------------------------------------------------------
      implicit none
      integer numatoms,order
      double precision fr1(numatoms),fr2(numatoms),fr3(numatoms)
      double precision theta1(order,numatoms),theta2(order,numatoms),
     $     theta3(order,numatoms),dtheta1(order,numatoms),
     $     dtheta2(order,numatoms),dtheta3(order,numatoms)

      double precision w
      integer n

      do 100 n = 1,numatoms
        w = fr1(n)-int(fr1(n))
        call fill_bspline(w,order,theta1(1,n),dtheta1(1,n))
        w = fr2(n)-int(fr2(n))
        call fill_bspline(w,order,theta2(1,n),dtheta2(1,n))
        w = fr3(n)-int(fr3(n))
        call fill_bspline(w,order,theta3(1,n),dtheta3(1,n))
100   continue
      return
      end
c---------------------------------------------------
      subroutine fill_bspline(w,order,array,darray)
c---------- use standard B-spline recursions: see doc file
      implicit none
      integer order
      double precision w,array(order),darray(order)

      integer k
c do linear case
      call init(array,w,order)
c compute standard b-spline recursion
      do 10 k = 3,order-1
       call one_pass(array,w,k)
10    continue
c perform standard b-spline differentiation
      call diff(array,darray,order)
c one more recursion
      call one_pass(array,w,order)
      return
      end
c---------------------------------------------------
      subroutine init(c,x,order)
      implicit none
      integer order
      double precision c(order),x
      c(order) = 0.d0
      c(2) = x
      c(1) = 1.d0 - x
      return
      end
c-------------------------------------
      subroutine one_pass(c,x,k)
      implicit none
      double precision c(*),x
      integer k

      double precision div
      integer j

      div = 1.d0 / (k-1)
      c(k) = div*x*c(k-1)
      do 100 j = 1,k-2
       c(k-j) = div*((x+j)*c(k-j-1) + (k-j-x)*c(k-j))
100   continue
      c(1) = div*(1-x)*c(1)
      return
      end
c-------------------------------------
      subroutine diff(c,d,order)
      implicit none
      double precision c(*),d(*)
      integer order

      integer j
      d(1) = -c(1)
      do 10 j = 2,order
       d(j) = c(j-1) - c(j)
10    continue
      return
      end
c-------------------------------------


C   FFT CALLS

      subroutine get_fftdims(nfft1,nfft2,nfft3,
     $       nfftdim1,nfftdim2,nfftdim3,nfftable,nffwork,
     $       sizfftab,sizffwrk)
      implicit none
      integer nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,
     $       nfftable,nffwork,sizfftab,sizffwrk
      integer n,nfftmax

      nfftmax = max(nfft1,nfft2,nfft3)
      nfftdim1 = nfft1
      n = nfft1/2
      if ( nfft1 .eq. 2*n )nfftdim1 = nfft1+1
      nfftdim2 = nfft2
      n = nfft2/2
      if ( nfft2 .eq. 2*n )nfftdim2 = nfft2+1
      nfftdim3 = nfft3
      n = nfft3/2
      if ( nfft3 .eq. 2*n )nfftdim3 = nfft3+1
#ifdef SGIFFT
      nfftable = 2*(nfftdim1+nfftdim2+nfftdim3+50)
      nffwork = 0
      sizfftab = nfftable
      sizffwrk  = nffwork
#endif
#ifdef CRAY
      nfftable = 2*(nfftdim1+nfftdim2+nfftdim3+50)
      nffwork = 4*nfftdim1*nfftdim2*nfftdim3
      sizfftab = nfftable
      sizffwrk  = nffwork
#else
      nfftable = 4*nfftmax + 15
      nffwork = nfftmax
      sizfftab = 3*nfftable
      sizffwrk  = 2*nfftmax
#endif
      return
      end

      subroutine fft_setup(array,fftable,ffwork,
     $      nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,
     $      nfftable,nffwork)
      implicit none

      double precision array(*),fftable(*),ffwork(*)
      integer nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3
      integer nfftable,nffwork,isys(4)

      integer isign,inc1,inc2,inc3
      double precision scale

#ifdef SGIFFT
      call ZFFT3DI(nfft1,nfft2,nfft3,fftable)
#endif
#ifdef CRAY
      write(6,*)'using cray fft code'
      isign = 0
      scale = 1.d0
      isys(1)=3
      isys(2)=0
      isys(3)=0
      isys(4)=0
      call CCFFT3D(isign,nfft1,nfft2,nfft3,scale,array,
     $      nfftdim1,nfftdim2,array,nfftdim1,nfftdim2,fftable,
     $      ffwork,isys)
#else
      write(6,*)'using public domain fft code'
      call pubz3di(nfft1,nfft2,nfft3,fftable,nfftable)
#endif
      return
      end
c-----------------------------------------------------------
      subroutine fft_forward(array,fftable,ffwork,
     $      nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,
     $      nfftable,nffwork)
      implicit none

      double precision array(*),fftable(*),ffwork(*)
      integer nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3

      integer isign,inc1,inc2,inc3
      double precision scale
      integer nfftable,nffwork,isys(4)

      isign = 1

#ifdef SGIFFT
      call ZFFT3D(isign,nfft1,nfft2,nfft3,array,
     $   nfftdim1,nfftdim2,fftable)
#endif
#ifdef CRAY
      scale = 1.d0
      isys(1)=3
      isys(2)=0
      isys(3)=0
      isys(4)=0
      call CCFFT3D(isign,nfft1,nfft2,nfft3,scale,array,
     $      nfftdim1,nfftdim2,array,nfftdim1,nfftdim2,fftable,
     $      ffwork,isys)
#else
      call pubz3d(isign,nfft1,nfft2,nfft3,array,
     $   nfftdim1,nfftdim2,fftable,nfftable,ffwork,nffwork)
#endif
      return
      end
c-----------------------------------------------------------
      subroutine fft_back(array,fftable,ffwork,
     $      nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3,
     $      nfftable,nffwork)
      implicit none

      double precision array(*),fftable(*),ffwork(*)
      integer nfft1,nfft2,nfft3,nfftdim1,nfftdim2,nfftdim3
      integer nfftable,nffwork,isys(4)

      integer isign,inc1,inc2,inc3
      double precision scale

      isign = -1

#ifdef SGIFFT
      call ZFFT3D(isign,nfft1,nfft2,nfft3,array,
     $   nfftdim1,nfftdim2,fftable)
#endif
#ifdef CRAY
      scale = 1.d0
      isys(1)=3
      isys(2)=0
      isys(3)=0
      isys(4)=0
      call CCFFT3D(isign,nfft1,nfft2,nfft3,scale,array,
     $      nfftdim1,nfftdim2,array,nfftdim1,nfftdim2,fftable,
     $      ffwork,isys)
#else
      call pubz3d(isign,nfft1,nfft2,nfft3,array,
     $   nfftdim1,nfftdim2,fftable,nfftable,ffwork,nffwork)
#endif
      return
      end
************
[roberto@nautilus tools]$ rpm
   RPM version 4.0.4
   Copyright (C) 1998-2000 - Red Hat, Inc.
   This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm {--help}
rpm {--version}
[roberto@nautilus tools]$ rpm nmap*.rpm
   RPM version 4.0.4
   Copyright (C) 1998-2000 - Red Hat, Inc.
   This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm {--help}
rpm {--version}
[roberto@nautilus tools]$ rpm --help
Usage: rpm [OPTION...]

   Query options (with -q or --query):
   -c, --configfiles                list all configuration files
   -d, --docfiles                   list all documentation files
   --dump                           dump basic file information
   -l, --list                       list files in package
   --queryformat=QUERYFORMAT        use the following query format
-s, --state                      display the states of the listed files
-v, --verbose                    display a verbose file listing
-a, --all                        query/verify all packages
-f, --file                       query/verify package(s) owning file
-g, --group                      query/verify package(s) in group
-p, --package                    query/verify a package file (i.e. a binary
*.rpm file)
--querytags                      display known query tags
--specfile                       query a spec file
--whatrequires                   query/verify the package(s) which require a
dependency
--whatprovides                   query/verify the package(s) which provide a
dependency

Verify options (with -V or --verify):
--nomd5[|=0x1]                   don't verify MD5 digest of files
   --nofiles[|=0x10000]             don't verify files in package
   --nodeps[|=0x20000]              don't verify package dependencies
   --noscript[|=0x40000]            don't execute %verifyscript (if any)
   -a, --all                        query/verify all packages
   -f, --file                       query/verify package(s) owning file
   -g, --group                      query/verify package(s) in group
   -p, --package                    query/verify a package file (i.e. a binary
*.rpm file)
   --querytags                      display known query tags
   --specfile                       query a spec file
   --whatrequires                   query/verify the package(s) which require a
   dependency
   --whatprovides                   query/verify the package(s) which provide a
   dependency

   Signature options:
   --addsign                        add a signature to a package
   --resign                         sign a package (discard current signature)
   -K, --checksig                   verify package signature
   --nogpg[&=~0x4]                  skip any GPG signatures
--nomd5[&=~0x2]                  do not verify file md5 checksums

  Database options:
  --initdb                         initialize database
  --rebuilddb                      rebuild database inverted lists from
  installed package headers

  Install/Upgrade/Erase options:
  --allfiles[|=0x40]               install all files, even configurations
which might otherwise be skipped
--allmatches[|=0x2]              remove all packages which match <package>
(normally an error is generated if
<package> specified multiple packages)
--badreloc[|=0x8]                relocate files in non-relocateable package
-e, --erase=<package>+           erase (uninstall) package
--excludedocs[|=0x20]            do not install documentation
--excludepath=<path>             skip files with leading component <path>
--force[|=0x74]                  short hand for --replacepkgs --replacefiles
 -F, --freshen=<packagefile>+     upgrade package(s) if already installed
-h, --hash[|=0x2]                print hash marks as package installs (good
with -v)
--ignorearch[|=0x2]              don't verify package architecture
   --ignoreos[|=0x1]                don't verify package operating system
   --ignoresize[|=0x180]            don't check disk space before installing
   --includedocs                    install documentation
   --install=<packagefile>+         install package
--justdb[|=0x8]                  update the database, but do not modify the
filesystem
--nodeps                         do not verify package dependencies
--noorder[|=0x8]                 do not reorder package installation to
satisfy dependencies
--noscripts[|=0xff0000]          do not execute package scriptlet(s)
--notriggers[|=0x990000]         do not execute any scriptlet(s) triggered
  by this package
  --oldpackage[|=0x40]             upgrade to an old version of the package
 (--force on upgrades does this
  automatically)
 --percent[|=0x1]                 print percentages as package installs
 --prefix=<dir>                   relocate the package to <dir>, if
relocatable
--relocate=<old>=<new>           relocate files from path <old> to <new>
  --repackage[|=0x400]             save erased package files by repackaging
--replacefiles[|=0x30]           install even if the package replaces
 installed files
 --replacepkgs[|=0x4]             reinstall if the package is already present
--test[|=0x1]                    don't install, but tell if it would work or
   not
   -U, --upgrade=<packagefile>+     upgrade package(s)

Common options for all rpm modes:
--version                        print the version of rpm being used
--quiet                          provide less detailed output
-v, --verbose                    provide more detailed output
--define='<name> <body>'         define macro <name> with value <body>
 --eval=<expr>+                   print macro expansion of <expr>+
-r, --root=<dir>                 use <dir> as the top level directory
(default: "/")
--macros=<file:...>              read <file:...> instead of default macro
file(s)
--rcfile=<file:...>              read <file:...> instead of default rpmrc
file(s)
--showrc                         display final rpmrc and macro configuration

Options implemented via popt alias/exec:
--scripts                        list install/erase scriptlets from
package(s)
--setperms                       set permissions of files in a package
--setugids                       set user/group ownership of files in a
package
--conflicts                      list capabilities this package conflicts
with
--obsoletes                      list other packages removed by installing
this package
--provides                       list capabilities that this package provides
--requires                       list capabilities required by package(s)
--info                           list descriptive information from package(s)
--changelog                      list change logs for this package
--triggers                       list trigger scriptlets from package(s)
--last                           list package(s) by install time, most
recent first
--filesbypkg                     list all files from each package
--redhatprovides                 find package name that contains a provided
capability (needs rpmdb-redhat package
installed)
--redhatrequires                 find package name that contains a required
capability (needs rpmdb-redhat package
installed)
--buildpolicy=<policy>           set buildroot <policy> (e.g. compress man
  pages)
  --with=<option>                  enable configure <option> for build
 --without=<option>               disable configure <option> for build

Help options:
-?, --help                       Show this help message
--usage                          Display brief usage message


unexpected token `file)'
[roberto@nautilus tools]$   --querytags                      display known query tags
bash: --querytags: command not found
[roberto@nautilus tools]$   --specfile                       query a spec file
bash: --specfile: command not found
[roberto@nautilus tools]$   --whatrequires                   query/verify the package(s) which require a
bash: syntax error near unexpected token `package(s'
[roberto@nautilus tools]$                                    dependency
bash: dependency: command not found
[roberto@nautilus tools]$   --whatprovides                   query/verify the package(s) which provide a
bash: syntax error near unexpected token `package(s'
[roberto@nautilus tools]$                                    dependency
bash: dependency: command not found
[roberto@nautilus tools]$
[roberto@nautilus tools]$ Signature options:
bash: Signature: command not found
[roberto@nautilus tools]$   --addsign                        add a signature to a package
bash: --addsign: command not found
[roberto@nautilus tools]$   --resign                         sign a package (discard current signature)
bash: syntax error near unexpected token `(d'
[roberto@nautilus tools]$   -K, --checksig                   verify package signature
bash: -K,: command not found
[roberto@nautilus tools]$   --nogpg[&=~0x4]                  skip any GPG signatures
bash: --nogpg[: command not found
[1] 10542
bash: =~0x4]: command not found
[1]+  Exit 127                --nogpg[
[roberto@nautilus tools]$   --nomd5[&=~0x2]                  do not verify file md5 checksums
bash: --nomd5[: command not found
[1] 10544
bash: =~0x2]: command not found
[1]   Exit 127                --nomd5[
[roberto@nautilus tools]$
[roberto@nautilus tools]$ Database options:
bash: Database: command not found
[roberto@nautilus tools]$   --initdb                         initialize database
bash: --initdb: command not found
[roberto@nautilus tools]$   --rebuilddb                      rebuild database inverted lists from
bash: --rebuilddb: command not found
[roberto@nautilus tools]$                                    installed package headers
bash: installed: command not found
[roberto@nautilus tools]$
[roberto@nautilus tools]$ Install/Upgrade/Erase options:
bash: Install/Upgrade/Erase: No such file or directory
[roberto@nautilus tools]$   --allfiles[|=0x40]               install all files, even configurations
bash: --allfiles[: command not found
bash: =0x40]: command not found
[roberto@nautilus tools]$                                    which might otherwise be skipped
/usr/bin/which: no might in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
/usr/bin/which: no otherwise in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
/usr/bin/which: no be in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
/usr/bin/which: no skipped in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/grace/bin/:/home/roberto/bin)
[roberto@nautilus tools]$   --allmatches[|=0x2]              remove all packages which match <package>
bash: syntax error near unexpected token `<package>'
[roberto@nautilus tools]$                                    (normally an error is generated if
>                                    <package> specified multiple packages)
bash: normally: command not found
bash: package: No such file or directory
[roberto@nautilus tools]$   --badreloc[|=0x8]                relocate files in non-relocateable package
bash: --badreloc[: command not found
bash: =0x8]: command not found
[roberto@nautilus tools]$   -e, --erase=<package>+           erase (uninstall) package
bash: syntax error near unexpected token `(u'
[roberto@nautilus tools]$   --excludedocs[|=0x20]            do not install documentation
bash: --excludedocs[: command not found
bash: =0x20]: command not found
[roberto@nautilus tools]$   --excludepath=<path>             skip files with leading component <path>
bash: syntax error near unexpected token `<path>'
[roberto@nautilus tools]$   --force[|=0x74]                  short hand for --replacepkgs --replacefiles
bash: --force[: command not found
bash: =0x74]: command not found
[roberto@nautilus tools]$   -F, --freshen=<packagefile>+     upgrade package(s) if already installed
bash: syntax error near unexpected token `package(s'
[roberto@nautilus tools]$   -h, --hash[|=0x2]                print hash marks as package installs (good
bash: syntax error near unexpected token `(g'
[roberto@nautilus tools]$     ed output
output: No such file or directory

?
[roberto@nautilus tools]$ who
roberto  pts/0    Jun 20 18:29
[roberto@nautilus tools]$ ls
dumpacl.zip             john-16w.zip    nmap-2.53-1.i386.rpm         pwdump2.zip
firewalk-0.99.1.tar.gz  lc3setup01.exe  nvx005.zip                   sid.zip
foundstone tools        Mis documentos  pandora_linux_v4.0_b2.1.tgz  thcscan.zip
icmpquery.c.txt         Mis imágenes    pan_online_95_b2.zip         whisker.zip
john-1.6.tar.gz         nessus          pan_online_nt_b2.zip
[roberto@nautilus tools]$ tar
tar: You must specify one of the `-Acdtrux' options
Try `tar --help' for more information.
[roberto@nautilus tools]$ tar --help
GNU `tar' saves many files together into a single tape or disk archive, and
can restore individual files from the archive.

Usage: tar [OPTION]... [FILE]...

Examples:
  tar -cf archive.tar foo bar  # Create archive.tar from files foo and bar.
  tar -tvf archive.tar         # List all files in archive.tar verbosely.
  tar -xf archive.tar          # Extract all files from archive.tar.

If a long option shows an argument as mandatory, then it is mandatory
for the equivalent short option also.  Similarly for optional arguments.

Main operation mode:
  -t, --list              list the contents of an archive
  -x, --extract, --get    extract files from an archive
  -c, --create            create a new archive
  -d, --diff, --compare   find differences between archive and file system
  -r, --append            append files to the end of an archive
  -u, --update            only append files newer than copy in archive
  -A, --catenate          append tar files to an archive
      --concatenate       same as -A
      --delete            delete from the archive (not on mag tapes!)

Operation modifiers:
  -W, --verify               attempt to verify the archive after writing it
      --remove-files         remove files after adding them to the archive
  -k, --keep-old-files       don't replace existing files when extracting
      --overwrite            overwrite existing files when extracting
      --overwrite-dir        overwrite directory metadata when extracting
  -U, --unlink-first         remove each file prior to extracting over it
      --recursive-unlink     empty hierarchies prior to extracting directory
  -S, --sparse               handle sparse files efficiently
  -O, --to-stdout            extract files to standard output
  -G, --incremental          handle old GNU-format incremental backup
  -g, --listed-incremental=FILE
                             handle new GNU-format incremental backup
      --ignore-failed-read   do not exit with nonzero on unreadable files

Handling of file attributes:
      --owner=NAME             force NAME as owner for added files
      --group=NAME             force NAME as group for added files
      --mode=CHANGES           force (symbolic) mode CHANGES for added files
      --atime-preserve         don't change access times on dumped files
  -m, --modification-time      don't extract file modified time
      --same-owner             try extracting files with the same ownership
      --no-same-owner          extract files as yourself
      --numeric-owner          always use numbers for user/group names
  -p, --same-permissions       extract permissions information
      --no-same-permissions    do not extract permissions information
      --preserve-permissions   same as -p
  -s, --same-order             sort names to extract to match archive
      --preserve-order         same as -s
      --preserve               same as both -p and -s

Device selection and switching:
  -f, --file=ARCHIVE             use archive file or device ARCHIVE
      --force-local              archive file is local even if has a colon
      --rsh-command=COMMAND      use remote COMMAND instead of rsh
  -[0-7][lmh]                    specify drive and density
  -M, --multi-volume             create/list/extract multi-volume archive
  -L, --tape-length=NUM          change tape after writing NUM x 1024 bytes
  -F, --info-script=FILE         run script at end of each tape (implies -M)
      --new-volume-script=FILE   same as -F FILE
      --volno-file=FILE          use/update the volume number in FILE

Device blocking:
  -b, --blocking-factor=BLOCKS   BLOCKS x 512 bytes per record
      --record-size=SIZE         SIZE bytes per record, multiple of 512
  -i, --ignore-zeros             ignore zeroed blocks in archive (means EOF)
  -B, --read-full-records        reblock as we read (for 4.2BSD pipes)

Archive format selection:
  -V, --label=NAME                   create archive with volume name NAME
              PATTERN                at list/extract time, a globbing PATTERN
  -o, --old-archive, --portability   write a V7 format archive
      --posix                        write a POSIX format archive
  -j, --bzip2                        filter the archive through bzip2
  -z, --gzip, --ungzip               filter the archive through gzip
  -Z, --compress, --uncompress       filter the archive through compress
      --use-compress-program=PROG    filter through PROG (must accept -d)

Local file selection:
  -C, --directory=DIR          change to directory DIR
  -T, --files-from=NAME        get names to extract or create from file NAME
      --null                   -T reads null-terminated names, disable -C
      --exclude=PATTERN        exclude files, given as a PATTERN
  -X, --exclude-from=FILE      exclude patterns listed in FILE
      --anchored               exclude patterns match file name start (default)
      --no-anchored            exclude patterns match after any /
      --ignore-case            exclusion ignores case
      --no-ignore-case         exclusion is case sensitive (default)
      --wildcards              exclude patterns use wildcards (default)
      --no-wildcards           exclude patterns are plain strings
      --wildcards-match-slash  exclude pattern wildcards match '/' (default)
      --no-wildcards-match-slash exclude pattern wildcards do not match '/'
  -P, --absolute-names         don't strip leading `/'s from file names
  -h, --dereference            dump instead the files symlinks point to
      --no-recursion           avoid descending automatically in directories
  -l, --one-file-system        stay in local file system when creating archive
  -K, --starting-file=NAME     begin at file NAME in the archive
  -N, --newer=DATE             only store files newer than DATE
      --newer-mtime=DATE       compare date and time when data changed only
      --after-date=DATE        same as -N
      --backup[=CONTROL]       backup before removal, choose version control
      --suffix=SUFFIX          backup before removal, override usual suffix

Informative output:
      --help            print this help, then exit
      --version         print tar program version number, then exit
  -v, --verbose         verbosely list files processed
      --checkpoint      print directory names while reading the archive
      --totals          print total bytes written while creating archive
  -R, --block-number    show block number within archive with each message
  -w, --interactive     ask for confirmation for every action
      --confirmation    same as -w

The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control may be set with --backup or VERSION_CONTROL, values are:

  t, numbered     make numbered backups
  nil, existing   numbered if numbered backups exist, simple otherwise
  never, simple   always make simple backups

GNU tar cannot read nor produce `--posix' archives.  If POSIXLY_CORRECT
is set in the environment, GNU extensions are disallowed with `--posix'.
Support for POSIX is only partially implemented, don't count on it yet.
ARCHIVE may be FILE, HOST:FILE or USER@HOST:FILE; DATE may be a textual date
or a file name starting with `/' or `.', in which case the file's date is used.
*This* `tar' defaults to `-f- -b20'.

Report bugs to <bug-tar@gnu.org>.

zen consultora

Blogger Widgets

Entrada destacada

Platzy y el payaso Freddy Vega, PLATZI APESTA, PLATZI NO SIRVE, PLATZI ES UNA ESTAFA, Platzy and the Clown Freddy Vega, PLATZI SUCKS, PLATZI IS A SCAM

  Platzy and the clowns Freddy Vega and Cvander – Part 1, PLATZI IS A SCAM Hello friends, this post will keep growing as I continue writing...