Previous Thread
Next Thread
Print Thread
Charmm array
#37210 12/05/18 06:26 AM
Joined: Oct 2017
Posts: 42
R
Rohit Offline OP
Forum Member
OP Offline
Forum Member
R
Joined: Oct 2017
Posts: 42
Hi,

I have read about set command and how to use array index with @@ but it does't say about how can we set/define the array.

say i want resid 2, 4, 9 and 11. so I want

my_array = [2,4,9,11] how can we define this array in charmm.

Last edited by Rohit; 12/05/18 06:27 AM.
Re: Charmm array
Rohit #37212 12/05/18 04:05 PM
Joined: Sep 2003
Posts: 8,545
Likes: 3
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,545
Likes: 3
One array element at a time, in a loop.

Also, duplicate posts are not permitted, and the other one was removed.


Rick Venable
computational chemist

Re: Charmm array
rmv #37214 12/06/18 08:32 AM
Joined: Oct 2017
Posts: 42
R
Rohit Offline OP
Forum Member
OP Offline
Forum Member
R
Joined: Oct 2017
Posts: 42
I cannot put 2, 4, 9, 11 in a loop as there is not constant increment these are random resid i want to access.

Re: Charmm array
Rohit #37215 12/06/18 04:07 PM
Joined: Sep 2003
Posts: 4,818
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,818
Likes: 2
Then use four separate lines.
If you have very many different values you can put them in a text file (one per line), which you can read into CHARMM variables using the get command (see miscom.doc)


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.016s Queries: 22 (0.009s) Memory: 0.9135 MB (Peak: 0.9951 MB) Data Comp: Off Server Time: 2021-05-08 17:06:33 UTC
Valid HTML 5 and Valid CSS