Page 1 of 4 1 2 3 4 >
Topic Options
#186 - 10/23/03 05:24 AM Sample scripts for basic tasks in CHARMM
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
I have posted a handful CHARMM input files, each as a separate thread. This is the README file for the collection.

This is a set of CHARMM sample input files for some basic tasks, put together
from files that have been used for several years in the lab, and some newly
created scripts.

You can get a tar-file containing all these files from
www.biosci.ki.se/md/charmm.html
All individual files have been posted to the Script Archive Forum at
www.charmm.org

The *.inp files are standalone scripts and may need editing to suit your
specific system, although some of them can actually be run directly with the
data files that are also included.
The *.str files should be streamed to from your input file (some of the
sample .inp files do this), and could be used as they are.

Most files require that unix environment variables CHM_HOME (pointing to
the CHARMM installation directory) and CHM_STREAM (pointing to the directory
where these files are located) are defined.

The scripts are only supposed to be a reasonable help to get started using
CHARMM - you have to know your system and make the scientific decisions
about it.

Most of the scripts have been tested for CHARMM typos and technical
correctness and should run with c27 or newer, but please report anomalies,
comments o r suggestions to

Lennart.Nilsson@biosci.ki.se

Stockholm, October 2003 (First edition)

SETUP
add-ions.str
gen-alpha-helix.inp
gen-dna.inp
gen-prot.inp
minimize.inp
rename-2pdb.str
setup-truncated-octahedron.str
solvent-box.str
solvent-shell.str
solvent-sphere.str

DYNAMICS
dynamics.inp
noe-dynamics.inp
run-cpt-md.inp
run-pbc-md.inp
run-sdb-md.inp

ANALYSIS
asa-protein.str
extract-coordinate-frame.inp
hbonds.inp
interaction-energy.inp
merge-orient-trajectory.inp
merge-recenter-trajectory.inp
rmsd-nucleotide.str
rmsd-residue.str
rmsd-rgyr.inp
rmsf-nucleotide.str
rmsf-residue.str
self-diffusion-coeff.inp
trp-anisotropy.inp

There is also a small set of auxiliary (data) files.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#187 - 10/20/04 09:31 PM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
Edo Offline
Forum Member

Registered: 08/31/04
Posts: 192
Hi Lennart,
I have a question about running your script "gen-prot.inp", which I downloaded from your website.

I define the environment variables as you recommend:
setenv CHM_HOME /v/estor1/home/charmm/c30b2/
setenv CHM_STREAM /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/

and run the script and get the following error:
CHARMM> open unit 21 read form name 4pti-a.pdb
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 21 cannot be opened as 4PTI-A.PDB

***** LEVEL 0 WARNING FROM *****
***** "OPEN" not possible.
******************************************

The 4pti-a.pdb file definatley exists in the working directory:

m1~/Temp/CHARMM_Tutorial/Scripts/>ls 4pti-a.pdb
4pti-a.pdb

It appears that charmm is not looking in my current working directory, because I can fix this error (and get the file to open) by modifying the following line:

open unit 21 read form name 4pti-a.pdb

to

open unit 21 read form name "$CHM_STREAM/H4pti-a.pdb"

CHARMM> open unit 21 read form name "$CHM_STREAM/4pti-a.pdb"
VOPEN> Attempting to open::/v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb::
OPNLGU> Unit 21 opened for READONLY access to /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb

My question is, how do I get CHARMM to automatically look into my current working directory (from which I call charmm and run the scripts) to open files? I would like to avoid having to give the absolute path of the input files each time.

Thanks,
Ed

Top
#188 - 10/21/04 02:29 AM Re: Sample scripts for basic tasks in CHARMM [Re: Edo]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
CHARMM does read from the current directory - there is nothing you have to do about it.
The only way I could reproduce your problem was by removing read privilege from the file (chmod -r 4pti-a.pbd).
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#189 - 10/21/04 04:54 AM Re: Sample scripts for basic tasks in CHARMM [Re: Edo]
bogdan Offline
Forum Member

Registered: 02/16/04
Posts: 147
Loc: Heidelberg, Germany
Look at the difference between:
Quote:

CHARMM> open unit 21 read form name 4pti-a.pdb
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 21 cannot be opened as 4PTI-A.PDB



and
Quote:

CHARMM> open unit 21 read form name "$CHM_STREAM/4pti-a.pdb"
VOPEN> Attempting to open::/v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb::
OPNLGU> Unit 21 opened for READONLY access to /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb




In the first case, CHARMM translated the file name to all uppercase; I'm sure that running 'ls 4PTI-A.PDB' would return 'No such file or directory.'. Using the quotes, as in the second case, makes a difference...

Top
#190 - 10/21/04 05:21 AM Re: Sample scripts for basic tasks in CHARMM [Re: bogdan]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
The double quotes are only necessary if the string is in mixed case.

These are the basic rules that CHARMM uses when opening a file:
1/If the filename is in double quotes, remove the quotes and use the string as is.
2/If there are no quotes, first convert the string to all lower case and try to open the file. If this fails convert the string to all upper case and try again. If this fails, issue error message.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#191 - 10/21/04 09:20 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
Edo Offline
Forum Member

Registered: 08/31/04
Posts: 192
It appears the file is readable/writable

m1~/Temp/CHARMM_Tutorial/Scripts/>ls -ls *pdb
48 -rw------- 1 ed cbs 46656 Oct 23 2003 4pti-a.pdb
8 -rw------- 1 ed cbs 4861 Oct 23 2003 4pti-wat.pdb
20 -rw------- 1 ed cbs 19582 Oct 23 2003 atcg.pdb

so I don't think that is the problem.

I modified the permissions to let all users have read/write access
m1~/Temp/CHARMM_Tutorial/Scripts/>chmod a+rw 4pti-a.pdb
m1~/Temp/CHARMM_Tutorial/Scripts/>ls -ls *pdb
48 -rw-rw-rw- 1 ed cbs 46656 Oct 23 2003 4pti-a.pdb

I then rerun the original script, only to get the same error:
CHARMM> open unit 21 read form name 4pti-a.pdb
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 21 cannot be opened as 4PTI-A.PDB

And Bogdan you are right, the capitalized form of the file does not exist:
m1~/Temp/CHARMM_Tutorial/Scripts/>ls 4PTI-A.PDB
ls: 4PTI-A.PDB: No such file or directory

Any other ideas what might be causing this problem?
Thanks for your help,
Ed

Top
#192 - 10/21/04 01:53 PM Re: Sample scripts for basic tasks in CHARMM [Re: Edo]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
Well, I cannot reproduce your problem.
What machine, OS and Fortran compiler are you using?

You can also check what your CHARMM thinks is the working directory, what files are in it, and if you can create a file there with a small CHARMM script:
* testing filenames
*
system "pwd"
system "ls -l"
open unit 21 write form name myfile.txt
stop
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#193 - 10/21/04 03:33 PM Re: Sample scripts for basic tasks in CHARMM [Re: Edo]
zhangxd68 Offline
Forum Member

Registered: 10/31/03
Posts: 39
try this

charmm<1.inp

the 1.inp is the following

* test
*
stream "inputfile"
stop

Top
#194 - 10/21/04 05:59 PM Re: Sample scripts for basic tasks in CHARMM [Re: zhangxd68]
Edo Offline
Forum Member

Registered: 08/31/04
Posts: 192
Hi,
I tried your suggestion, get the same error (see error below). Here are the different tests I've tried, only 'Test 3' works.

* test
*

! Test 0
!stream "4pti-a.pdb"
!stop

! Test 1
!open unit 21 read form name 4pti-a.pdb
!close unit 21

!Test 2
!open unit 21 read form name /v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb
!close unit 21

! Test 3
open unit 21 read form name "/v/estor3/home/usr/Temp/CHARMM_Tutorial/Scripts/4pti-a.pdb"
close unit 21

Here is my computer info:
Linux de6 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux

I am running charmm version c30b2.

Ed

Here was the error message for 'Test 0':
CHARMM> ! Test 0
CHARMM> stream "4pti-a.pdb"
VOPEN> Attempting to open::4pti-a.pdb::
OPNLGU> Unit 99 cannot be opened as 4pti-a.pdb

***** LEVEL 0 WARNING FROM *****
***** "OPEN" not possible.
******************************************
BOMLEV ( 0) IS REACHED - TERMINATING. WRNLEV IS 5

Top
#195 - 10/21/04 06:00 PM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
Edo Offline
Forum Member

Registered: 08/31/04
Posts: 192
Lennart,
When I include the system calls in the script this is the output (before it dies).

CHARMM> system "pwd"
Invoking: pwd
/v/apps/charmm/c30b2

CHARMM> system "ls -l"
Invoking: ls -l

Regards,
Ed

Top
#196 - 10/21/04 06:28 PM Problem solved [Re: Edo]
Edo Offline
Forum Member

Registered: 08/31/04
Posts: 192
Hi,
It appears the problem was I was running a parrallel compiled vesion of charmm, instead of the serial version.

When I run the serial version the scripts seem to work fine.

Thanks for your time and help,
Ed

Top
#197 - 10/22/04 10:39 AM Re: Problem solved [Re: Edo]
zhangxd68 Offline
Forum Member

Registered: 10/31/03
Posts: 39
hi, ED

The inputfile is your input file name, not just the "****.pdb". You misunderstand.

Top
#198 - 05/17/05 04:10 PM create a big water box: solvent-box.str and readwat-box.str [Re: lennart]
guan Offline
Forum Member

Registered: 04/27/05
Posts: 74

The templete solvent-box.str was used. Anybody has comments on the following?

size 35x35x95 is Ok, but 45x45x95 gives error:

CHARMM> read sequence tip3 @NSLAB
Parameter: NSLAB -> "1944"

CHARMM> gene wat3 noangle nodihe
NO PATCHING WILL BE DONE ON THE FIRST RESIDUE
NO PATCHING WILL BE DONE ON THE LAST RESIDUE
GENPSF> Segment 5 has been generated. Its identifier is ^@^@^@^@^@^@^@^@.


***** LEVEL -4 WARNING FROM *****
***** DATA STRUCTURE REALLOCATED IN ALLDT
******************************************
BOMLEV ( -2) IS REACHED - TERMINATING. WRNLEV IS 5

Top
#199 - 05/17/05 04:31 PM Re: create a big water box: solvent-box.str and readwat-box.str [Re: guan]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
The size of the system that can be created using these scripts depends on the size parameter used when CHARMM was installed at your site. To resolve this you have to re-install CHARMM using eg LARGE or XXLARGE. Note that even if the final number of atoms/residues could be handled by your present CHARMM version, the scripts may still fail at an intermediate stage when water molecules are being added. This issue has been discussed before.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#200 - 05/24/07 06:17 PM fortran [Re: lennart]
KdeFuego Offline
Forum Member

Registered: 05/15/07
Posts: 4
what fortran version I must use for make scrips?

Top
#201 - 05/25/07 02:43 AM Re: fortran [Re: KdeFuego]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
FORTRAN is usually used to make "programs", not scripts. If you are modifying CHARMM source code FORTRAN77 is the standard for versions before c33b1. For c33b1 and later versions use FORTRAN90.
Tip: Use the POST function instead of REPLY when creating a post on a new topic.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#202 - 11/13/08 10:58 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
ardie Offline
Forum Member

Registered: 03/28/08
Posts: 43
Hi lennart,
Thanks for your sharing scripts. I am a beginner for charmm. Your scripts really benifit me much. But I have some questions for solvent-shell.str. I think I need your helps. In the DO_X part in solvent-shell.str, you write:

! do the same slab again, but translated -1A and rotated 30 degrees around the x-axis
read sequence tip3 @NSLAB
gene wat3 noangle nodihe
coor dupl sele segid wat0 end sele segid wat3 end
coor rota xdir 1.0 phi 30.0 sele segid wat3 end
coor transl xdir -1.0 sele segid wat3 end

I don't clearly understand why make the slab translated -1A and rotated 30 degrees around the x-axis. Why not just let the slab slide along the x-axisdo without "translated -1A and rotated 30 degrees around the x-axis" ?

Thanks.

Ardie

Top
#203 - 11/13/08 11:06 AM Re: Sample scripts for basic tasks in CHARMM [Re: ardie]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
Just to increase the chance that we fill all possible cavities and crevices with water; there may be low density regions in the water box we started from.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#204 - 11/14/08 06:51 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
ardie Offline
Forum Member

Registered: 03/28/08
Posts: 43
Thanks. But I am still confused. Why do you rotate it by just 30 rather than by other value?


Edited by ardie (11/14/08 06:52 AM)

Top
#205 - 11/14/08 07:01 AM Re: Sample scripts for basic tasks in CHARMM [Re: ardie]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
If I had picked any other value you could still have asked the same question, so perhaps the number 30 is not so special.
You can change it to any other value that better suits your mood, or remove that part of the script if you want.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#206 - 11/14/08 09:24 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
ardie Offline
Forum Member

Registered: 03/28/08
Posts: 43
Thanks.

Quote:

If I had picked any other value you could still have asked the same question, so perhaps the number 30 is not so special.
You can change it to any other value that better suits your mood, or remove that part of the script if you want.



Top
#207 - 02/09/09 06:36 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
indrajit Offline
Forum Member

Registered: 12/11/08
Posts: 22
Loc: WestBengal, India
Respected Sir,
I have a problem using your stream file. I am trying to generate a truncated octahedron using the stream file set-up-truncated-octahedron.str file. But it is giving me the following output error message.

CHARMM> image byresidue select .not. SOLUTE end

***** LEVEL -2 WARNING FROM <CHARMM> *****
***** IMAGES NEED TO BE PRESENT
******************************************
BOMLEV ( 0) IS REACHED - TERMINATING. WRNLEV IS 5


I dont understand the error. What kind of error is it ? where and how do i get the image.

Please try to guide me. I will be highly thankful to you.

Indrajit Deb.
Research Scholar.
Dept. of Biophysics, molecular biology & bioinformatics.
Calcutta University.
India.

Top
#208 - 02/09/09 06:49 AM Re: Sample scripts for basic tasks in CHARMM [Re: indrajit]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
The stream file sets up the PBC with images. Did you modify it, or were there other errors prior to the one you report?
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#209 - 02/09/09 07:11 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
indrajit Offline
Forum Member

Registered: 12/11/08
Posts: 22
Loc: WestBengal, India
Respected Sir,
Thanks for reply, there are no prior error report.
Do charmm have to read any .img file like tips.img. I am waiting for your help.
Thanks


Edited by indrajit (02/09/09 07:12 AM)

Top
#210 - 02/09/09 11:59 AM Re: Sample scripts for basic tasks in CHARMM [Re: indrajit]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
It would help if you posted more of the output; as I said the script does normally setup PBC and images for you, so something unexpected must have happened before the error you posted. Does your system fulfill the stated assumptions for using the script, eg "PSF and coordinates from a system at least as large as the truncated octahedron have to be present"? One way to get this is to solvate your system in a sphere (solvate-sphere.str).
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#22579 - 10/21/09 05:26 PM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
Jun Offline
Forum Member

Registered: 10/19/09
Posts: 22
Hi,

I am a beginner using charmm.
I have a question about running script "gen-prot.inp". When reading sequence from PDB file, why do we use 4pti-a.pdb not 4pti.pdb ? Is it because of the number of peptide chain ?
Then, can we identify the number of peptide chain from the number of chain ID ?

Finally, how do you make 4pti-a.pdb from 4pti.pdb ?
Is there any script that change from 4pti.pdb to 4pti-a.pdb or do I need to change them by hand?

Thank you.

Jun

Top
#22581 - 10/22/09 02:12 AM Re: Sample scripts for basic tasks in CHARMM [Re: Jun]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
Yes it is because there is more than one chain in the original file; read the comments in the script.
Yes.
Editor.
There are probably lots scripts out there to do this. Note that you would already be finihsed with this task if you had simply done it instead of having to wait for an answer here.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#31052 - 12/02/12 03:27 PM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
Drishti Offline
Forum Member

Registered: 11/18/12
Posts: 33
Hey Lennart,

I am using your solvent-box script, the generated crd file contains 263 water molecules and the psf generated contains 252.

Is that normal or is their something weird that is going on somewhere?

Top
#31056 - 12/03/12 02:25 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
That should not happen.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#36659 - 11/17/17 01:09 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
prabhash Offline
Forum Member

Registered: 08/12/17
Posts: 10
Hi,
Rick
I am learner about CHARMM
When I the above gen_alpha_helix.inp
I got hte problem ! Unix environment variable CHM_HOME should point to the charmm installation directory
I am using the C43b1
what is the actual problem ?
what sequence should i follow for molecular dynamics simulation of the given above tar file examples
Regards,
ED

Top
#36661 - 11/18/17 07:55 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
What are you trying to do? And what is your problem?
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#36663 - 11/20/17 12:49 AM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
prabhash Offline
Forum Member

Registered: 08/12/17
Posts: 10
How I can convert simple .pdb format into CHARMM readable format by using GENRTF for any type of molecules? If it is not possible ,is there any way ?



Thanks,
ED

Top
#36665 - 11/20/17 03:23 PM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
lennart Offline

Forum Member

Registered: 09/25/03
Posts: 4688
Loc: ~ 59N, 15E
I do not know what GENRTF is, or why you have to use it.
CHARMM can read PDB formatted coordinate files directly, so you should not have to convert your file.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#36667 - 11/20/17 05:39 PM Re: Sample scripts for basic tasks in CHARMM [Re: lennart]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8259
Loc: 39 03 48 N, 77 06 54 W
GENRTF appears to be part of the CHARMMing site, and I believe it's main utility lies in creating residue definitions to facilitate QM/MM calculations. There is a specific forum for questions about CHARMMing (and it is not this one).

If you wish to add new molecules to CHARMM, see the Parameter forum, esp. the information on CGenFF and the ParamChem site. GENRTF is NOT suitable for this purpose.
_________________________
Rick Venable
computational chemist


Top
Page 1 of 4 1 2 3 4 >

Moderator:  chmgr, John Legato, petrella