| ²é¿´: 6777 | »Ø¸´: 15 | ||||||||||||
| ±¾Ìû²úÉú 2 ¸ö Ä£ÄâEPI £¬µã»÷ÕâÀï½øÐв鿴 | ||||||||||||
qphll½ð³æ (ÕýʽдÊÖ)
|
[½»Á÷]
¡¾·ÖÏí¡¿³¢ÊÔlammpsÖÐ, ·ÖÏíÖÐ... ÒÑÓÐ9È˲ÎÓë
|
|||||||||||
|
Lesson 1 Loop inside Lammps input script ÏëÒª³¢ÊÔÔÚlammpsµÄinput scriptÀïÃæ×öÑ»·, ½á¹ûÒòΪһ¸öСÎÊÌâ, µ·¹ÄÁËÎÒ¼¸¸öСʱ, Õâ²ÅÍêȫͨ¹ý²âÊÔ. ·ÖÏíÒ»ÏÂ. (1) input scriptÀïÃæµÄÑ»·¿é include tempfile include tempfile2 variable i loop 10 label loopa fix 2 all nvt temp ${mytemp} ${mytemp2} 100.0 run 200 unfix 2 next mytemp next mytemp2 next i jump SELF loopa Õâ¸öµÄSELFÊÇÈóÌÐòÖ´Ðе½ÕâÀï, Ìø»Ø×Ô¼º, È»ºó´Ó±êÇ© loopa¿ªÊ¼Ö´ÐÐ. µ±È»loopaÊÇËæ±ãÈ¡µÄ, Äã¿ÉÒÔÓÃCHNÀ´×ölabel. ÁíÍâ, ÔÚijЩÇé¿öÏÂ, Èç¹ûÒªÈÃc++ rewind, ÄÇô×îºÃÔÚÖ´Ðнű¾ÀïÃæÕâÑùд: lmp -in script ¶ø²»ÊÇ lmp < script ·ñÔò, ÄãÈËÆ·²»ºÃµÄʱºò, »á³öÎÊÌâ, ¹þ¹þ. (2) tempfile ºÍ tempfile2ÊÇÔÚͬĿ¼ÏµÄÁíÍâÁ½¸öÎļþ. tempfileµÄÎļþÄÚÈÝÊÇ: variable mytemp index 500.0 700.0 900.0 1100.0 1300.0 1500.0 1700.0 1900.0 2100.0 2300.0 ×¢Òâ, Ö»ÓÐÒ»ÐÐ! ÖÁÓÚlammpsÄܶÁ¶à³¤µÄÒ»ÐÐ, ÎÒ»¹Ã»ÓвâÊÔ. tempfile2µÄÎļþÄÚÈÝ, Ò²ÊÇÒ»ÐÐ: variable mytemp2 index 700.0 900.0 1100.0 1300.0 1500.0 1700.0 1900.0 2100.0 2300.0 2500.0 ÕÛÌÚÎÒµÄÎÊÌâÊÇ, ÎÒÔÏÈÔÚÕâÁ½¸ötempfileÎļþÖÐ, ÊýÖµÖ®¼äÓöººÅ·Ö¸ô, µ«ÊÇÊÂʵÉÏ, ÊÇÐèÒªÓÿոñ·Ö¸ôµÄ. (3) Èç¹ûÄãÐèÒª×öµÄÑ»·²»ÊǺܶà, ÄÇô²»ÐèÒª¶îÍâ×¼±¸tempfile ºÍ tempfile2Îļþ. ¶øÖ»ÊÇÐèÒªÔÚ input scriptÖÐÕâÑù×ö: variable mytemp index 500.0 700.0 900.0 1100.0 1300.0 1500.0 1700.0 1900.0 2100.0 2300.0 #variable mytemp2 index 700.0 900.0 1100.0 1300.0 1500.0 1700.0 1900.0 2100.0 2300.0 2500.0 variable i loop 10 label loopa fix 2 all nvt temp ${mytemp} ${mytemp2} 100.0 run 200 unfix 2 next mytemp next mytemp2 next i jump SELF loopa µ±È», ÕâÀï²»ÐèÒªÔÏȵÄÕâÁ½¾ä includeÓï¾äÁË. ×ܽáÒ»ÏÂÄãÐèÒªÊìϤµÄÃüÁî: variable, include, jume, next End of Lesson 1. ENJOY. [ Last edited by qphll on 2010-12-3 at 11:54 ] |
» ÊÕ¼±¾ÌûµÄÌÔÌûר¼ÍƼö
×ÊÔ´ÊÕ¼¯ | ²ÄÁϼÆËãÄ£ÄâʵÓü¼ÇÉ | ·Ö×ÓÄ£Äâ | MD·Ö×Ó¶¯Á¦Ñ§ |
ÎÒѧϰ¼ÆËãµÄһЩÌû×Ó | ·Ö×Ó¶¯Á¦Ñ§ | Á¿»¯ | LAMMPS |
¹ØÓÚLammps |
» ±¾ÌûÒÑ»ñµÃµÄºì»¨£¨×îÐÂ10¶ä£©
» ²ÂÄãϲ»¶
Ôõô²é°¡
ÒѾÓÐ6È˻ظ´
»ù½ðϵͳʲôÄÚÈÝҲûÓÐ
ÒѾÓÐ8È˻ظ´
Ϊʲô×ÊÖúÊý¸÷´ó¸ßУ¶¼´´Ð¸ߣ¬×Ô¼ºÉêÇëÔõô¾ÍÕâôÄÑ
ÒѾÓÐ10È˻ظ´
ÓжàÉÙÈËÊǽñÌì²éϵͳ֪µÀ½á¹ûµÄ£¿
ÒѾÓÐ18È˻ظ´
¹ú×ÔÈ»ÃæÉϸ´ÅÌ~»¶ÓÌÖÂÛ
ÒѾÓÐ12È˻ظ´
ÊÛSCIÒ»ÇøÎÄÕ£¬ÎÒ:8O5.5.1.O5.4,¿ÆÄ¿È«,¿ÉÙ¤¼±
ÒѾÓÐ3È˻ظ´
ÄÄλ¸ßÈËÖÐÁË£¬°Ñ²éѯµ½µÄ½ØÍ¼Ìù³öÀ´ÈÃÎÒ¿´¿´£¬ÈÃÎÒ³¤³¤¼ûʶ
ÒѾÓÐ6È˻ظ´
ÊÛSCIÎÄÕ£¬ÎÒ:8O5.5.1.O.54,¿ÆÄ¿ÆëÈ«,¿É+¼±
ÒѾÓÐ4È˻ظ´
ÃæÉϺÏ×÷µ¥Î»¸ÇÕÂ
ÒѾÓÐ5È˻ظ´
µ¼Ê¦Í²ۣºÎÒÔõô̯ÉÏÁËÕâô¸ö¼«Æ·Ñо¿Éú£¡
ÒѾÓÐ7È˻ظ´
» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:
ÔÚLammpsÖа²×°xmovie¹¤¾ßʱ£¬MakefileÎļþÔõôÐÞ¸ÄX¿â·¾¶
ÒѾÓÐ3È˻ظ´
lammpsÖй̶¨¼ü³¤
ÒѾÓÐ4È˻ظ´
¡¾ÇóÖú¡¿lammps°²×°¹ý³ÌÖУ¬ÔÚ°²×°fftwµÄ¹ý³ÌÖÐÓöµ½ÎÊÌâ
ÒѾÓÐ8È˻ظ´
¡¾ÌÖÂÛ¡¿ÏëѧlammpsÊÇ·ñÓ¦¸ÃÏÈѧϰC++
ÒѾÓÐ28È˻ظ´
¡¾ÌÖÂÛ¡¿lammps-¹ÖÒìµÄgroupζÈ
ÒѾÓÐ9È˻ظ´
¡¾ÌÖÂÛ¡¿lammpsÀïµÄboundaryµÄλÖÃÄܹ»ËæÒâ¸ü¸Ä£¿
ÒѾÓÐ14È˻ظ´
¡¾ÌÖÂÛ¡¿lammpsÖÐÀûÓÃvelocityÃüÁîÎÞ·¨¿ØÖÆ×¡ËÙ¶ÈÎÊÌâ
ÒѾÓÐ11È˻ظ´
¡¾ÇóÖú¡¿lammpsÖжàÔª»¯ºÏÎïµÄ¾§¸ñ´´½¨ÎÊÌâ
ÒѾÓÐ14È˻ظ´

qphll
½ð³æ (ÕýʽдÊÖ)
- Ä£ÄâEPI: 10
- Ó¦Öú: 18 (СѧÉú)
- ½ð±Ò: 2708.7
- É¢½ð: 2294
- ºì»¨: 8
- Ìû×Ó: 554
- ÔÚÏß: 227.1Сʱ
- ³æºÅ: 89654
- ×¢²á: 2005-08-29
- ÐÔ±ð: GG
- רҵ: Ì¼ËØ²ÄÁÏÓ볬Ӳ²ÄÁÏ
¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
ghcacj(½ð±Ò+10):лл 2010-12-10 10:41:06
ghcacj(½ð±Ò+10):лл 2010-12-10 10:41:06
|
Q: ÈçºÎÔÚÅÜÍêreax MDÒÔºó, ÅжÏÊÇ·ñÓз´Ó¦·¢ÉúÁËÄØ? A: (1) ÔÚinput scriptÎļþÖÐʹÓÃÃüÁî 'fix reax/bonds' Êä³ö³É¼üÐÅÏ¢, ¾ßÌåÇë²éѯÊÖ²á; (2) ʹÓÃÕâÀï¸ø³öµÄС³ÌÐòÀ´¶ÁÈ¡outputÎļþ, ½«ÌáÈ¡³öÀ´µÄÐÅÏ¢×÷ͼÅжÏ. Çë¸ù¾Ý×Ô¼ºµÄÌåϵ, ×ÔÐÐÐ޸ĸø³öµÄС³ÌÐò. ÎÒ»¹Ã»À´µÃ¼°¸Ä½ø.... !# DEC.9, 2010 !# QPHLL !# !# This is a program to read the output from 'fix reax/bond', TPRD, Lammps !# The output is saved into file "bonds.connect", where each image is divided !# into three parts: !# !# (1) Head, 7 Lines; !# (2) Body, No._of_atom Lines; !# (3) Tail, 1 Line !# !# The total number of images is related with the output frequence and number of iterations. !# In this case, it is "number of iteration+1". !# !# Each line in Body part is made up of the following parameters: !# id, type, nb, id_1, id_2, ... id_nb, mol, bo_1, bo_2, ... bo_nb, abo, nlp, q !# abo = atomic bond order !# nlp = number of lone pairs !# q = atomic charge !# !# PLEASE DOUBLE CHECK YOUR OWN LAMMPS INPUT SCRIPT & OUTPUT AND MAKE CORRESPONDING CHSNGES program main implicit none integer I, J, K, L integer image, natom integer headline, tailline integer id, atype, nb, bd1, bd2, bd3, mol double precision bo1, bo2, bo3, abo, nlp, q open (unit=10, file='bonds.connect') open (unit=20, file='N129.txt', status='unknown') open (unit=21, file='N133.txt', status='unknown') open (unit=22, file='N137.txt', status='unknown') open (unit=23, file='N141.txt', status='unknown') open (unit=24, file='N145.txt', status='unknown') open (unit=25, file='N149.txt', status='unknown') open (unit=26, file='N153.txt', status='unknown') open (unit=27, file='N157.txt', status='unknown') image = 2000 headline = 7 tailline = 1 natom = 160 do I = 1, image+1 do J = 1, headline read(10,*) end do do K = 1, natom read(10,*) id, atype, nb write(*,*) id, atype, nb if (atype .eq. 4) then backspace 10 read(10,*) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q write(*,*) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q if (id .eq. 129) then write(20, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 133) then write(21, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 137) then write(22, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 141) then write(23, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 145) then write(24, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 149) then write(25, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 153) then write(26, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 157) then write(27, 200) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q 200 format(7I4, 6f14.3) endif endif enddo do L =1,tailline read(10,*) enddo enddo end program main |

5Â¥2010-12-10 01:47:12
qphll
½ð³æ (ÕýʽдÊÖ)
- Ä£ÄâEPI: 10
- Ó¦Öú: 18 (СѧÉú)
- ½ð±Ò: 2708.7
- É¢½ð: 2294
- ºì»¨: 8
- Ìû×Ó: 554
- ÔÚÏß: 227.1Сʱ
- ³æºÅ: 89654
- ×¢²á: 2005-08-29
- ÐÔ±ð: GG
- רҵ: Ì¼ËØ²ÄÁÏÓ볬Ӳ²ÄÁÏ
¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
ghcacj(½ð±Ò+20):лл 2010-12-04 17:09:24
ghcacj(½ð±Ò+20):лл 2010-12-04 17:09:24

2Â¥2010-12-04 15:07:09
sg18408926
ÖÁ×ðľ³æ (ÖøÃûдÊÖ)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 10945.9
- É¢½ð: 246
- ºì»¨: 1
- Ìû×Ó: 1075
- ÔÚÏß: 431.4Сʱ
- ³æºÅ: 727956
- ×¢²á: 2009-03-21
- ÐÔ±ð: GG
- רҵ: Äý¾Û̬ÎïÐÔ II £ºµç×ӽṹ
3Â¥2010-12-04 17:27:08
qphll
½ð³æ (ÕýʽдÊÖ)
- Ä£ÄâEPI: 10
- Ó¦Öú: 18 (СѧÉú)
- ½ð±Ò: 2708.7
- É¢½ð: 2294
- ºì»¨: 8
- Ìû×Ó: 554
- ÔÚÏß: 227.1Сʱ
- ³æºÅ: 89654
- ×¢²á: 2005-08-29
- ÐÔ±ð: GG
- רҵ: Ì¼ËØ²ÄÁÏÓ볬Ӳ²ÄÁÏ
¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
ghcacj(½ð±Ò+20):лл 2010-12-10 10:40:58
ghcacj(½ð±Ò+20):лл 2010-12-10 10:40:58

4Â¥2010-12-07 23:19:38
qphll
½ð³æ (ÕýʽдÊÖ)
- Ä£ÄâEPI: 10
- Ó¦Öú: 18 (СѧÉú)
- ½ð±Ò: 2708.7
- É¢½ð: 2294
- ºì»¨: 8
- Ìû×Ó: 554
- ÔÚÏß: 227.1Сʱ
- ³æºÅ: 89654
- ×¢²á: 2005-08-29
- ÐÔ±ð: GG
- רҵ: Ì¼ËØ²ÄÁÏÓ볬Ӳ²ÄÁÏ
¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
ghcacj(½ð±Ò+10, Ä£ÄâEPI+1):лл 2010-12-10 10:41:17
ghcacj(½ð±Ò+10, Ä£ÄâEPI+1):лл 2010-12-10 10:41:17
|
¸üÐÂÒ»ÏÂ, ÉÔ΢ÐÞ¸ÄÁËÒ»ÏÂǰ¥µÄ³ÌÐò. ÏÖÔÚÈç¹ûÔÚ¼ÆËãÖÐÓз¢Éú¹ý·´Ó¦, ÄÇô·ÖÎö³ÌÐò»á½«ÄDz¿·ÖÐÅÏ¢Êä³öµ½ÁíÍâµÄÒ»¸öÎļþÖÐ. !# DEC.9, 2010 !# QPHLL !# www.muchong.com !# !# This is a program to read the output from 'fix reax/bond', TPRD, Lammps !# The output is saved into the file "bonds.connect", where each image is divided !# into three parts: !# !# (1) Head, 7 Lines; !# (2) Body, No._of_atom Lines; !# (3) Tail, 1 Line !# !# The total number of images is related with the output frequence and number of iterations. !# In this case, it is "number of iteration+1". !# !# Each line in Body part is made up of the following parameters: !# id, type, nb, id_1, id_2, ... id_nb, mol, bo_1, bo_2, ... bo_nb, abo, nlp, q !# abo = atomic bond order !# nlp = number of lone pairs !# q = atomic charge !# !# PLEASE DOUBLE CHECK YOUR OWN LAMMPS INPUT SCRIPT & OUTPUT AND MAKE CORRESPONDING CHSNGES program main implicit none integer I, J, K, L integer image, natom integer headline, tailline integer id, atype, nb, bd1, bd2, bd3, bd4, mol double precision bo1, bo2, bo3, bo4, abo, nlp, q open (unit=10, file='bonds.connect') open (unit=20, file='N129.txt', status='unknown') open (unit=21, file='N133.txt', status='unknown') open (unit=22, file='N137.txt', status='unknown') open (unit=23, file='N141.txt', status='unknown') open (unit=24, file='N145.txt', status='unknown') open (unit=25, file='N149.txt', status='unknown') open (unit=26, file='N153.txt', status='unknown') open (unit=27, file='N157.txt', status='unknown') open (unit=30, file='reactionRecord.txt', status='unknown') !# Make changes accordingly. image = 2000 headline = 7 tailline = 1 natom = 160 do I = 1, image+1 ! Skip the head part do J = 1, headline read(10,*) end do ! Each image has 'natom' lines do K = 1, natom ! read in the first three number each line to determine: ! (1) what type of atom it is, atype ! the correspondence in Lammps: 1-C, 2-H, 3-O, 4-N, 5-S ! (2) how many bonds it has, nb ! this 'nb' determines the following bond_link information & bond_order paramaters of the same line read(10,*) id, atype, nb ! TEST ! write(*,*) id, atype, nb if (atype .eq. 4) then backspace 10 ! Should have some easier way to replace this "IF", I am just toooo lazy. ! Thanks to the fact that the maximum number of bonds is 4. ^-^ !??? is it possible that nb = 0 ??? KEEP THAT IN MIND. if (nb.eq.0) then read(10,*) id, atype, nb, mol, abo, nlp, q if (id .eq. 129) then write(20, 200) id, atype, nb, mol, abo, nlp, q elseif (id .eq. 133) then write(21, 200) id, atype, nb, mol, abo, nlp, q elseif (id .eq. 137) then write(22, 200) id, atype, nb, mol, abo, nlp, q elseif (id .eq. 141) then write(23, 200) id, atype, nb, mol, abo, nlp, q elseif (id .eq. 145) then write(24, 200) id, atype, nb, mol, abo, nlp, q elseif (id .eq. 149) then write(25, 200) id, atype, nb, mol, abo, nlp, q elseif (id .eq. 153) then write(26, 200) id, atype, nb, mol, abo, nlp, q elseif (id .eq. 157) then write(27, 200) id, atype, nb, mol, abo, nlp, q 200 format(4I4, 3f14.3) endif ! If bd .ne. 3, it measn reaction is happening to Nitrogen atom. write (30, 300) I, id, atype, nb, mol, abo, nlp, q 300 format(5I4, 3f14.3) elseif (nb.eq.1) then read(10,*) id, atype, nb, bd1, mol, bo1, abo, nlp, q if (id .eq. 129) then write(20, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q elseif (id .eq. 133) then write(21, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q elseif (id .eq. 137) then write(22, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q elseif (id .eq. 141) then write(23, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q elseif (id .eq. 145) then write(24, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q elseif (id .eq. 149) then write(25, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q elseif (id .eq. 153) then write(26, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q elseif (id .eq. 157) then write(27, 201) id, atype, nb, bd1, mol, bo1, abo, nlp, q 201 format(5I4, 4f14.3) endif ! If bd .ne. 3, it measn reaction is happening to Nitrogen atom. write (30, 301) I, id, atype, nb, bd1, mol, bo1, abo, nlp, q 301 format(6I4, 4f14.3) elseif (nb.eq.2) then read(10,*) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q if (id .eq. 129) then write(20, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q elseif (id .eq. 133) then write(21, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q elseif (id .eq. 137) then write(22, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q elseif (id .eq. 141) then write(23, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q elseif (id .eq. 145) then write(24, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q elseif (id .eq. 149) then write(25, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q elseif (id .eq. 153) then write(26, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q elseif (id .eq. 157) then write(27, 202) id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q 202 format(6I4, 5f14.3) endif ! If bd .ne. 3, it measn reaction is happening to Nitrogen atom. write (30, 302) I, id, atype, nb, bd1, bd2, mol, bo1, bo2, abo, nlp, q 302 format(7I4, 5f14.3) elseif (nb.eq.3) then read(10,*) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q if (id .eq. 129) then write(20, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 133) then write(21, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 137) then write(22, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 141) then write(23, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 145) then write(24, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 149) then write(25, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q elseif (id .eq. 153) then write(26, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bd3, abo, nlp, q elseif (id .eq. 157) then write(27, 203) id, atype, nb, bd1, bd2, bd3, mol, bo1, bo2, bo3, abo, nlp, q 203 format(7I4, 6f14.3) endif elseif (nb.eq.4) then read(10,*) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q if (id .eq. 129) then write(20, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q elseif (id .eq. 133) then write(21, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q elseif (id .eq. 137) then write(22, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q elseif (id .eq. 141) then write(23, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q elseif (id .eq. 145) then write(24, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q elseif (id .eq. 149) then write(25, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q elseif (id .eq. 153) then write(26, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bd3, bo4, abo, nlp, q elseif (id .eq. 157) then write(27, 204) id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q 204 format(8I4, 7f14.3) endif ! If bd .ne. 3, it measn reaction is happening to Nitrogen atom. write (30, 304) I, id, atype, nb, bd1, bd2, bd3, bd4, mol, bo1, bo2, bo3, bo4, abo, nlp, q 304 format(9I4, 7f14.3) ! Corresponding to "if (nb.eq.0) then " endif ! Corresponding to "if (atype .eq. 4) then" endif enddo do L =1,tailline read(10,*) enddo enddo end program main |

6Â¥2010-12-10 03:29:50
qphll
½ð³æ (ÕýʽдÊÖ)
- Ä£ÄâEPI: 10
- Ó¦Öú: 18 (СѧÉú)
- ½ð±Ò: 2708.7
- É¢½ð: 2294
- ºì»¨: 8
- Ìû×Ó: 554
- ÔÚÏß: 227.1Сʱ
- ³æºÅ: 89654
- ×¢²á: 2005-08-29
- ÐÔ±ð: GG
- רҵ: Ì¼ËØ²ÄÁÏÓ볬Ӳ²ÄÁÏ

7Â¥2010-12-11 10:32:02
hbcsucy
ľ³æ (СÓÐÃûÆø)
AAA
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 5593.2
- É¢½ð: 10
- ºì»¨: 1
- Ìû×Ó: 293
- ÔÚÏß: 192.4Сʱ
- ³æºÅ: 1067102
- ×¢²á: 2010-07-31
- ÐÔ±ð: GG
- רҵ: Äý¾Û̬ÎïÐÔ II £ºµç×ӽṹ

8Â¥2010-12-13 16:11:36
qphll
½ð³æ (ÕýʽдÊÖ)
- Ä£ÄâEPI: 10
- Ó¦Öú: 18 (СѧÉú)
- ½ð±Ò: 2708.7
- É¢½ð: 2294
- ºì»¨: 8
- Ìû×Ó: 554
- ÔÚÏß: 227.1Сʱ
- ³æºÅ: 89654
- ×¢²á: 2005-08-29
- ÐÔ±ð: GG
- רҵ: Ì¼ËØ²ÄÁÏÓ볬Ӳ²ÄÁÏ
¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
ghcacj(½ð±Ò+10, Ä£ÄâEPI+1): лл 2011-02-24 13:30:03
ghcacj(½ð±Ò+10, Ä£ÄâEPI+1): лл 2011-02-24 13:30:03
|
ºÃ¾ÃûÓÐ×öʲô¸üÐÂ, ÕâÁ½¸öÔÂÀ´ÔÚLammps, ÓÈÆäÊÇreaxffÉÏÃæ»¨Á˲»ÉÙʱ¼ä, дÁ˲»ÉÙС³ÌÐò, ÏÖÔÚ»ù±¾µ½Ò»¸öβÉù. ºÜ¶à³ÌÐòдµÄʱºòÒ»¹Ä×÷Æø, ûÓкܺõؼÓÈ뱸ע, ½ñÌ컨ÁËÒ»ÕûÌìµÄʱ¼ä×¢ÊÍÁËһЩ³ÌÐòµÄÓÃ;. ÓпÉÄÜ»áÂýÂý·¢³öÀ´. ÕâÊDzÅдϵÄÒ»¶Î»°, ÊǶÔÓÚlammps+reaxÖÐ×îÖØÒªÁ½¸öÊä³öÎļþµÄ´¦ÀíÒâ¼û. ³ÌÐò±¾Éí¶Ô±ðÈËûÓÐʲô°ïÖú, µ«ÊÇÕâ¶Î±¸×¢ÎÒÏëºÍ´ó¼Ò·ÖÏí. ! The "REAXFRAG" code needs two files: ! (1) coordinate table <---- "molfra.configure" <----- from Lammps "molfra" dump file, prepared by this code ! (2) bond order table <---- "bonds.connect" <---- directly from Lammps 'fix' dump ! ! The corresponding commamds in "in.reaxff" file look like: ! ! "dump 1 all custom 10 molfra id type q x y z vx vy vz mass" ! "dump_modify 1 sort id" <---- This "sort" option is very important. ! ! "fix 2 all reax/bonds 10 bonds.connect" ! ! Some further explanations to the "molfra" and "bonds.connect" files. ! ! Each frame of "molfra" is made up of the head part, 9 line and body part, N line (N=number of atoms of the system). ! So an output of "m" MD iterations will produce (m+1)*(N+9) lines in "molfra". ! ! Each frame of "bonds.connect" file has head part, 7 line, body part, N line (N=number of atoms of the system) ! and tail part, 1 line, which contains a "#" sign as the ending remark. ! So an output of "m" MD iterations will produce (m+1)*(N+8) lines in "molfra". ! ! "m+1" comes from the fact that Lammps dose output the t=0 image. ! !!!!!!!!!!!! ! IT IS VERY IMPORTANT that you use same output frequency for all the dumps in Lammps. ! You also need to 'sort' the output so that atoms in different dump files are in good match. ! That explains why I prefer to seprate the minimization part from MD runs. !!!!!!!!!!!! ! ! The other input is the number of frames in 'molfra', which is the number of iterations ! you request in "in.reaxff" file, such as the following: ! ! "run 1200000" ! ! ! Required input: ! "molfra" from Lammps & number of frames in the molfra file ! ! Please always double check to make sure that is what you want to have. ! @ QPHLL, Feb.23,2010 |

9Â¥2011-02-24 07:13:34
qphll
½ð³æ (ÕýʽдÊÖ)
- Ä£ÄâEPI: 10
- Ó¦Öú: 18 (СѧÉú)
- ½ð±Ò: 2708.7
- É¢½ð: 2294
- ºì»¨: 8
- Ìû×Ó: 554
- ÔÚÏß: 227.1Сʱ
- ³æºÅ: 89654
- ×¢²á: 2005-08-29
- ÐÔ±ð: GG
- רҵ: Ì¼ËØ²ÄÁÏÓ볬Ӳ²ÄÁÏ
¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
ghcacj(½ð±Ò+20): лл 2011-02-24 13:30:14
ghcacj(½ð±Ò+20): лл 2011-02-24 13:30:14
|
ÕâÊÇÁíÍâÒ»¸öscript, ¾ÍÊÇÓÃÀ´¸ñʽת»¯. ûÓÐʲô, µ«ÊÇÍùÍùÐèÒªºÜ¶àÕâÑùµÄscriptÔÚ¸÷¸öÈí¼þÖ®¼ä×÷ΪÇÅÁº. ÓÐËÐèÒª, ¾¡¹ÜÄÃÈ¥°É. ! This is to write the output XYZ file from Lammps output format into: ! (1) the normal XYZ format which is readable by most progrms, such as imol ! (2) the "initial.dat" file which is the required input when you use "read_data" ! in the "in.reaxff" file ! ! You can use this script to 'look' at each image along the way of your simulation ! or convert at any point of Lammps XYZ file into a new "initial.dat" file. ! I find it useful since I seperate minimization from MD production, and I use this ! script if there is a need for rerun a job. ! ! Be aware of the two facts: ! (1) the IDs of atoms are defined in "initial.dat" file of Lammps ! You have to compare the definition of atom with "in.reaxff" file to make sure ! that you've got the right atom types; ! ! (2) the box size is hard-coded here as: ! ! lx = 39.352194 ! ly = 42.600000 ! lz = 60.000000 ! halflz = lz/2.0 ! ! Pay attention to the PBC issue and wrap your coordinates back in one smooth image. ! ! You need to change accordingly or treat it as an interactive input. ! ! I have a different version(lmp2lmp_ver.f90), where basically I match-up ! the atom types between "initial.dat" and "in.reaxff". ! The other version(batchlmp2lmp.f90) is capable of batch conversion: ! (1) generated an index of files that you want to convert ! This can be done by this command at your target folder ! # find *.xyz > list ! (2) the format of that index file is as the following: ! Line one: Number of files (N) ! Line two to N: the name of file ! ! Required input: name of XYZ file and number of atom type ! ! Please always double check to make sure that is what you want to have. ! @ QPHLL, Feb.23,2010 ! program lmp2lmp implicit none integer natom, ntype,I, id integer zero, one,two,three,four,five double precision x, y, z,lx,ly,lz, halflz character*1 C, H, O, N, S, atype*2, ctmp1*2, ctmp2*2,ctmp3*2 character*100 filename, temp, temp2 C='C' H='H' O='O' N='N' S='S' zero=0 one=1 two=2 three=3 four=4 five=5 lx = 39.352194 ly = 42.600000 lz = 60.000000 halflz = lz/2.0 write (6,*)'Output from LAMMPS MINIMIZATION (probably structure.*.xyz) ?' read (5,'(a40)')filename temp='initial.dat'//filename temp2 ='formatted'//filename open(unit=30,file=filename,status='old') open(unit=20, file=temp, status='unknown') open(unit=40, file=temp2, status='unknown') read(30,*) natom read(30,*) write (6,*)'How many types of atoms ?' read (5,*) ntype write(40,*) natom write(40,*) write(20,*) write(20,*) write(20,*) natom, "atoms" write(20,*) write(20,*) ntype,"atom types" write(20,*) write(20,*) 0.00000,lx, "xlo xhi" write(20,*) 0.00000,ly, "ylo yhi" write(20,*) 0.00000,lz, "zlo zhi" write(20,*) write(20,*) write(20,*) "Atoms" write(20,*) do I = 1, natom read(30,*)id, x, y, z if(z.lt.halflz) then write(20,100)I,id,zero,x, y, z else write(20,100)I,id,zero,x, y, z-lz endif if(z.lt.halflz) then if (id.eq.1) then write(40,*)C, x, y, z elseif(id.eq.2) then write(40,*)H, x, y, z elseif(id.eq.3) then write(40,*)O, x, y, z elseif(id.eq.4) then write(40,*)N, x, y, z elseif(id.eq.5) then write(40,*)S, x, y, z else write(6,*)'Wrong atom ID!' stop endif else if (id.eq.1) then write(40,*)C, x, y, z-lz elseif(id.eq.2) then write(40,*)H, x, y, z-lz elseif(id.eq.3) then write(40,*)O, x, y, z-lz elseif(id.eq.4) then write(40,*)N, x, y, z-lz elseif(id.eq.5) then write(40,*)S, x, y, z-lz else write(6,*)'Wrong atom ID!' stop endif endif 100 format(I6,1x,I3,1x,I3,1x,3f12.6) enddo end program lmp2lmp |

10Â¥2011-02-24 07:16:55









»Ø¸´´ËÂ¥
fly771125









30
ͶƱ: