psf problems

406 views
Skip to first unread message

Toon

unread,
May 29, 2007, 9:11:19 AM5/29/07
to cp2k
Hi,

I've been trying to run an mc simulation with the input given below.
I'm just trying to understand how this should work in cp2k. The input
is just a dummy example. When I try to run this example (with
cp2k.sdbg), I got this error:

...
PSF_INFO| Parsing the NATOM section
PSF_INFO| NATOM = 5
PSF_INFO| Parsing the NBOND section
PSF_INFO| NBOND = 4
PSF_INFO| Parsing the NTHETA section
PSF_INFO| NTHETA = 6
PSF_INFO| Parsing the NPHI section
PSF_INFO| NPHI = 0
At line 886 of file /home/toon/tmp/build/cp2k/makefiles/../src/
topology_util.F
Traceback: (Innermost first)
Called from line 498 of file /home/toon/tmp/build/cp2k/makefiles/../
src/topology_psf.F
Called from line 359 of file /home/toon/tmp/build/cp2k/makefiles/../
src/topology.F
Called from line 206 of file /home/toon/tmp/build/cp2k/makefiles/../
src/topology.F
Called from line 279 of file /home/toon/tmp/build/cp2k/makefiles/../
src/qs_environment.F
Called from line 111 of file /home/toon/tmp/build/cp2k/makefiles/../
src/qs_main.F
Called from line 729 of file /home/toon/tmp/build/cp2k/makefiles/../
src/f77_interface.F
Called from line 268 of file /home/toon/tmp/build/cp2k/makefiles/../
src/cp2k_runs.F
Called from line 847 of file /home/toon/tmp/build/cp2k/makefiles/../
src/cp2k_runs.F
Called from line 248 of file /home/toon/tmp/build/cp2k/makefiles/../
src/cp2k.F
Fortran runtime error: Array element out of bounds: 31 in (1:5), dim=1


The psf file is also given below. It describes the topology of exactly
one of the eight methane molecules. I believe the psf file is correct,
is it? I did take a look at the part of the code where the error
occurs but I don't really understand what it is expected to do. (It
reads the psf file, something goes wrong when processing the one-four
pairs, but I don't get the details.) Is there something wrong in the
input/psf file or is this a bug? The examples from the regtests work
on my machine.

best regards,

Toon

the input file:


&FORCE_EVAL

METHOD Quickstep
&DFT
&QS
METHOD PM3
EPS_DEFAULT 1.0E-12
EPS_GVG 1.0E-6
EPS_PGF_ORB 1.0E-6
&END QS
&SCF
EPS_SCF 1.0E-6
MAX_SCF 150
SCF_GUESS atomic
&END SCF
&END DFT

&SUBSYS
&CELL
ABC 7.800000 7.800000 7.800000
UNIT ANGSTROM
&END CELL
&COORD
C 7.1545135964 0.2916147406 0.6622232680
H 6.6668950468 1.1504609369 1.1033507689
H 7.6334667531 0.6233226102 -0.2564860726
H 6.4208845485 -0.4795931637 0.4356274201
H 7.9005900072 -0.1048244889 1.3410306662
C 6.8528101393 3.6807499565 1.5744193983
H 6.4514929741 2.8349587584 2.1188989803
H 7.7679317225 3.4073223315 1.0559592149
H 7.0709998781 4.4961704973 2.2881955953
H 6.1341098685 4.0308814768 0.8225903997
C 1.9813613499 6.7192653419 5.8763727299
H 2.0321973418 7.4196170794 6.7046158757
H 1.2903991153 7.1400631283 5.1330330349
H 1.5834916118 5.7941607545 6.2462624125
H 2.9782222352 6.5700588933 5.4382607646
C 6.8935808834 10.9042343214 4.8896018240
H 6.9090027651 10.0556726408 5.5732300957
H 7.1082178538 11.7975226536 5.4836337927
H 5.9106655806 10.9864139714 4.4468607567
H 7.6585223681 10.7854616816 4.0984669623
C 3.4097928887 4.5767446702 2.2242443860
H 3.0529585247 4.4184677018 1.2009363529
H 3.2785552112 3.6406911435 2.7889006394
H 2.8302525350 5.3840010296 2.6917414739
H 4.4528957985 4.8811323379 2.2007501082
C 2.9805519373 8.2006034213 9.5372130039
H 3.3335722902 9.0450868984 10.1155313292
H 2.1188103649 7.7275659069 10.0272973693
H 3.7804325728 7.4372375456 9.4173176654
H 2.6890775746 8.5348163384 8.5285057129
C 6.0352120743 6.4801397125 4.0960140077
H 6.5874102060 7.3836880272 3.9041291362
H 5.4489916745 6.2452884244 3.2172777054
H 5.3670640659 6.6104228115 4.9504368037
H 6.7521214494 5.6814792763 4.3123759997
C 3.2928814788 2.5582719306 5.8498575291
H 3.0860227820 2.3159397213 6.8922542536
H 3.5005462509 3.6199393877 5.7655448415
H 2.4455631533 2.3255776287 5.2113735329
H 4.1684058503 1.9781743596 5.5368454612
&END COORD
&TOPOLOGY
CONNECTIVITY MOL_SET
&MOL_SET
NMOL 8
CONN_FILE_NAME single.psf
&END
&END TOPOLOGY
&PRINT
&TOPOLOGY_INFO
EACH 1
PSF_INFO T
&END TOPOLOGY_INFO
&END PRINT
&END SUBSYS
&END FORCE_EVAL

&GLOBAL
FFT_LIB FFTW3
PROJECT mc
RUN_TYPE MC
&END GLOBAL

&MOTION
&MC
IUPTRANS 6400000
IUPVOLUME 3200000
LBIAS no
LSTOP yes
NMOVES 8
NSTEP 2
PMSWAP 0.0
PMTRAION 0.00
PMTRANS 0.00
PMVOLUME 1.00
PMVOL_BOX 1.00
PRESSURE 1
ENSEMBLE traditional
RESTART no
RESTART_FILE_NAME mc_restart_1
RMDIHEDRAL 3.0
RMANGLE 3.0
RMBOND 0.074
RMROT 26.0
RMTRANS 0.38
RMVOLUME 0.5
TEMP 101.055000
AVBMC_RMIN 1.0
AVBMC_RMAX 5.0
AVBMC_ATOM 1
PBIAS 0.5
PMAVBMC_MOL 1.0
PMSWAP_MOL 1.0
PMROT_MOL 1.0
PMTRANS_MOL 1.0
PMTRAION_MOL 1.0
&END MC
&PRINT
&TRAJECTORY
EACH 5
&END TRAJECTORY
&END PRINT
&END MOTION


The file single.psf looks like this:

PSF

1 !NTITLE
None

5 !NATOM
1 NAME 1 NAME C C 0.0 12.010700 0
2 NAME 1 NAME H H 0.0 1.007940 0
3 NAME 1 NAME H H 0.0 1.007940 0
4 NAME 1 NAME H H 0.0 1.007940 0
5 NAME 1 NAME H H 0.0 1.007940 0

4 !NBOND
2 1 3 1 4 1 5 1

6 !NTHETA
4 1 2 5 1 2 3 1 2
5 1 4 4 1 3 5 1 3

0 !NPHI

0 !NIMPHI

0 !NDON

0 !NACC

0 !NNB

Teodoro Laino

unread,
May 29, 2007, 1:40:22 PM5/29/07
to cp...@googlegroups.com
Toon,

from your input file I see you're using not an up2date version of
cp2k.. at least 1-2 months old..
I cannot offer any help for the code you are using..

BUT if you update to the new one and use this section:

&TOPOLOGY
CONNECTIVITY MOL_SET
&MOL_SET
&MOLECULE
NMOL 8
CONN_FILE_NAME single.psf
CONNECTIVITY UPSF
&END
&END
&END TOPOLOGY


your example works..

Bytheway.. yours is not a standard PSF.. me and Axel were working
for a couple of weeks and at the moment
cp2k supports the EXT standard of the PSF.. everytime you have a psf
that is not standard you need to specify
that its connectivity is UPSF (mostly you don't care about the format..)

teo

Toon

unread,
May 30, 2007, 2:00:03 AM5/30/07
to cp2k
Hi Teo,

Thanks for your help. I'll update my copy of cp2k. Is there a standard
specification for the PSF format availlable on the internet? In the
(very) long run, I'd like to update my scripts to generate standard
psf files.

cheers,

Toon

Teodoro Laino

unread,
May 30, 2007, 2:12:19 AM5/30/07
to cp...@googlegroups.com
PSF is a CHARMM standard format.. you won't find any place around
where they specify the format..
all the available programs reading PSF have +/- hacked the original
format..
so we do..

teo

Toon

unread,
Jun 1, 2007, 7:50:53 AM6/1/07
to cp2k
Hi, I have a related question. Is it normal that

COORDINATE XYZ
COORD_FILE_NAME geometry.xyz

can not be used with MC simumations, or is this a problem with my
compilation of cp2k?

cheers,

Toon

Teodoro Laino

unread,
Jun 1, 2007, 8:15:16 AM6/1/07
to cp...@googlegroups.com
please send input file and all files needed to run the job..
Without it's difficult to give any kind of help,

teo

Toon

unread,
Jun 1, 2007, 9:18:41 AM6/1/07
to cp2k
My apologies for the inconveinience. This is a more complete
description of the problem: I'm now running a cp2k compilation checked
out this morning. I have a problem that seems to be related to these
two input lines:

COORDINATE XYZ
COORD_FILE_NAME geometry.xyz

The error given by cp2k looks like this:

...
MC| The moves will not be biased,
MC| A full energy calculation will be done at every step.
MC| 4 swap insertions will be attempted per molecular swap move

File name mc.inp


************************************************
*** ERROR in mc_types.F/mc_input_file_create ***
************************************************

*** Could not find &END after &COORD (make sure & is the first in the
***
*** same column after &COORD)
***


===== Routine Calling Stack =====

1 CP2K

CP2K| Stopped by process
number 0
CP2K| Abnormal program termination

Aborted


It appears that the MC code requires the COORD section to be used
instead of other means of defining the molecular geometry. These are
all the input files:

mc.inp:

&FORCE_EVAL

METHOD Quickstep
&DFT
&QS
METHOD PM3
EPS_DEFAULT 1.0E-12
EPS_GVG 1.0E-6
EPS_PGF_ORB 1.0E-6
&END QS
&SCF
EPS_SCF 1.0E-6
MAX_SCF 150
SCF_GUESS atomic
&END SCF
&END DFT

&SUBSYS
&CELL
ABC 7.800000 7.800000 7.800000
UNIT ANGSTROM
&END CELL

&TOPOLOGY
COORDINATE XYZ
COORD_FILE_NAME init.xyz


CONNECTIVITY MOL_SET
&MOL_SET
&MOLECULE
NMOL 8
CONN_FILE_NAME single.psf
CONNECTIVITY UPSF
&END
&END
&END TOPOLOGY

&PRINT
&TOPOLOGY_INFO
EACH 1
PSF_INFO T
&END TOPOLOGY_INFO
&END PRINT
&END SUBSYS
&END FORCE_EVAL

&GLOBAL
FFT_LIB FFTSG


PROJECT mc
RUN_TYPE MC
&END GLOBAL

&MOTION
&MC
IUPTRANS 100
IUPVOLUME 100
LBIAS no
LSTOP no
NMOVES 1
NSTEP 10
PMSWAP 0.0
PMSWAP_MOL 1.0
PMTRAION 0.00
PMTRAION_MOL 1.0
PMTRANS 0.5
PMTRANS_MOL 1.0
PMROT_MOL 1.0
PMVOLUME 0.2
PMVOL_BOX 1.0
PRESSURE 1.013


ENSEMBLE traditional
RESTART no
RESTART_FILE_NAME mc_restart_1

RMDIHEDRAL 1.0


RMANGLE 3.0
RMBOND 0.074
RMROT 26.0
RMTRANS 0.38

RMVOLUME 1.0
TEMPERATURE 298.0
IPRINT 1
AVBMC_ATOM 1
NSWAPMOVES 4
PMAVBMC 0.5
PMAVBMC_MOL 1.0
AVBMC_RMIN 2.0
AVBMC_RMAX 4.0
PBIAS 0.5
VIRIAL_TEMPS 300.0


&END MC
&PRINT
&TRAJECTORY
EACH 5
&END TRAJECTORY
&END PRINT
&END MOTION

This is single.psf

PSF

1 !NTITLE
None

5 !NATOM
1 NAME 1 NAME C C 0.0 12.010700 0
2 NAME 1 NAME H H 0.0 1.007940 0
3 NAME 1 NAME H H 0.0 1.007940 0
4 NAME 1 NAME H H 0.0 1.007940 0
5 NAME 1 NAME H H 0.0 1.007940 0

4 !NBOND
2 1 3 1 4 1 5 1

6 !NTHETA
4 1 2 5 1 2 3 1 2
5 1 4 4 1 3 5 1 3

0 !NPHI

0 !NIMPHI

0 !NDON

0 !NACC

0 !NNB


This is init.xyz

40
i = 200, E = 22.6433415965
C 6.9039075582 2.2556748672 0.6684090906
H 7.5807042939 2.9514646584 0.1778234170
H 6.4359114825 1.6148018511 -0.0751255788
H 6.1411834553 2.8077213762 1.2123856443
H 7.4649087760 1.6437421117 1.3661103663
C 6.9115470203 6.1425921064 2.1589360246
H 7.6276416557 6.8618026951 2.5486690023
H 7.4061522809 5.4950308617 1.4429986121
H 6.1001618632 6.6677780946 1.6615302422
H 6.5170086641 5.5418353691 2.9752995498
C 0.8124559617 6.2174060423 6.1085385115
H 0.9682759157 6.3527520522 5.0415332216
H -0.0050460555 6.8521178205 6.4438165561
H 1.7204472263 6.4844467269 6.6359163451
H 0.5776741793 5.1779744893 6.3188571695
C 4.6568183079 8.5306984679 4.5589000442
H 5.4014171220 8.0383130247 5.1798098710
H 4.0720357993 7.7856805661 4.0247749152
H 5.1510519252 9.1888538100 3.8480745892
H 3.9962925018 9.1156867542 5.1893066759
C 3.0026367985 4.6804958145 2.1341762406
H 2.5872117262 5.3961909512 2.8398055744
H 3.5973758287 3.9441956718 2.6702281645
H 3.6343783322 5.2012588593 1.4230404511
H 2.1983186479 4.1851221980 1.5958594440
C 3.0357598254 8.6354879819 8.5015934277
H 2.2355644284 8.1192114793 9.0268620523
H 3.7132001125 7.9084963590 8.0584302518
H 3.5842911872 9.2497091821 9.2067104274
H 2.6159490587 9.2689729491 7.7228475826
C 8.5668539873 2.2952643674 4.5588139458
H 9.3584593729 2.7884860822 5.1172331341
H 9.0003049169 1.6000473260 3.8438410104
H 7.9715191708 3.0389332591 4.0342037810
H 7.9309384985 1.7492402764 5.2468924719
C 4.7102978422 4.6594015643 6.0167776096
H 5.5013143603 4.2000713116 5.4279574197
H 5.1427927774 5.3339687406 6.7519655838
H 4.1333208145 3.8893804981 6.5228756168
H 4.0540983796 5.2195783822 5.3595115407

Teodoro Laino

unread,
Jun 1, 2007, 10:59:26 AM6/1/07
to cp...@googlegroups.com
Thanks for the files Toon,

it needs a COORD section mostly because the conversion to the new
input was not fully
completed for the MC module.

Teo

Jadzia

unread,
Jan 1, 2018, 9:18:10 AM1/1/18
to cp2k
Happy new year to everyone,

I have a closely related problem to the one above. I get the error message:


 FORCEFIELD| Missing Angle             (NG2R,CG2R,OG2R)
 FORCEFIELD| Missing Angle             (CG2R,CG2R,OG2R)
 FORCEFIELD| Missing Angle             (OG2R,CG2R,HGR5)
 *******************************************************************************
 *   ___                                                                       *
 *  /   \                                                                      *
 * [ABORT]                                                                     *
 *  \___/                 Missing critical ForceField parameters!              *
 *    |                                                                        *
 *  O/|                                                                        *
 * /| |                                                                        *
 * / \                                                 force_fields_util.F:387 *
 *******************************************************************************


But in my PSF file I do not have any atoms of the type these types (e.g. NG2R), only longer types (e.g. NG2R50). These are the default CGenFF atom types. 

PSF
       1 !NTITLE
 REMARKS VMD-generated NAMD/X-Plor PSF structure file

    1821 !NATOM
         1 LIG         1      LIG      N1Q    NG2S1     -0.495000  14.0067     0
         2 LIG         1      LIG      C1Q    CG2O1      0.464000  12.0107     0
         3 LIG         1      LIG      O1Q    OG2D1     -0.509000  15.9994     0
         4 LIG         1      LIG      C2Q    CG331     -0.269000  12.0107     0
         5 LIG         1      LIG      C3Q    CG311      0.150000  12.0107     0
         6 LIG         1      LIG      C4Q   CG2R61      0.005000  12.0107     0
         7 LIG         1      LIG      C5Q   CG2R61     -0.111000  12.0107     0
         8 LIG         1      LIG      C6Q   CG2R61     -0.114000  12.0107     0
         9 LIG         1      LIG      C7Q   CG2R67     -0.004000  12.0107     0
        10 LIG         1      LIG      C8Q   CG2R61     -0.114000  12.0107     0
        11 LIG         1      LIG      C9Q   CG2R61     -0.111000  12.0107     0
        12 LIG         1      LIG     C10Q   CG2R67     -0.004000  12.0107     0
        13 LIG         1      LIG     C11Q   CG2R61     -0.114000  12.0107     0
        14 LIG         1      LIG     C12Q   CG2R61     -0.114000  12.0107     0
        15 LIG         1      LIG     C13Q   CG2R61     -0.115000  12.0107     0
        16 LIG         1      LIG     C14Q   CG2R61     -0.114000  12.0107     0
        17 LIG         1      LIG     C15Q   CG2R61     -0.114000  12.0107     0
        18 LIG         1      LIG     C16Q    CG321     -0.136000  12.0107     0
        19 LIG         1      LIG      S1Q    SG311     -0.076000  32.0650     0
        20 LIG         1      LIG     C17Q   CG2R53      0.562000  12.0107     0
        21 LIG         1      LIG      N2Q   NG2R50     -0.355000  14.0067     0
        22 LIG         1      LIG      N3Q   NG2R50     -0.249000  14.0067     0
        23 LIG         1      LIG     C18Q   CG2R57      0.545000  12.0107     0
        24 LIG         1      LIG      O2Q   OG2R50     -0.465000  15.9994     0
        25 LIG         1      LIG     C19Q   CG2R57      0.247000  12.0107     0
        26 LIG         1      LIG     C20Q   CG2R51     -0.179000  12.0107     0
        27 LIG         1      LIG     C21Q   CG2R51     -0.276000  12.0107     0

And for all atom types I do have parameters in the prm file. 

I have already tried to shift the position of the columns, in vain. In the cp2k input file I have specified:  CONN_FILE_FORMAT upsf

Any help is highly appreciated. I use cp2k version 5.1. 

Thank you very much,
Jadzia

Jadzia

unread,
Jan 1, 2018, 1:14:28 PM1/1/18
to cp2k
After many more hours of searching for the cause of the problem I was able to identify it. 

What made the search very difficult was also the misleading error message of CP2K (see previous mail), because it issued an error about missing angle terms where atom types where not fully expaned, but CP2K has truncated the atom types in the error message. This led me to believe that too long atom types or problems in the psf file are the cause of the problem. However, CP2K had correctly parsed the psf files and the full atom types (which had up to six characters).

From what I can tell the problem seems to be that the official CGenFF file contains comments which contain the "@" symbol, e.g. 

CG2DC1 CG2DC1 CG2DC2   48.00    123.00 ! RETINOL 13DP, Pentadiene @@@@@ Kenno: 123.5-->123.0 @@@@@

Which seems to cause CP2K to ignore the entire parameter section. After delete the @-symbols CP2K is running as it should.

Best wishes,
Jadzia
Reply all
Reply to author
Forward
0 new messages