TinkerTools / tinker9

Tinker9: Next Generation of Tinker with GPU Support
Other
48 stars 28 forks source link

unable to set atoms inactive #250

Closed blakemertz closed 6 months ago

blakemertz commented 6 months ago

I set a series of CA atoms in my protein to be inactive using the inactive parameter in my key file, but when I go to minimize the system, I get the following error:

     ######################################################################    
   ##########################################################################  
  ###                                                                      ### 
 ###            Tinker9  --  Software Tools for Molecular Design            ###
 ##                                                                          ##
 ##                       Version 1.4.0  February 2023                       ##
 ##                                                                          ##
 ##                 Copyright (c)  Zhi Wang & the Ponder Lab                 ##
 ###                           All Rights Reserved                          ###
  ###                                                                      ### 
   ##########################################################################  
     ######################################################################    

 Compiled at:  17:09:07  Apr  1 2024
 Commit Date:  Thu Nov 9 12:11:35 2023 -0800
 Commit:       70bd0529

 GPU Device :  Setting Device ID to 0 from GPU utilization
 Terminating with uncaught exception :  All atoms must be active. at /media/bak11/binaries/git/tinker9/src/atom.cpp:44

My inactive line in my key file is as follows:

# set CA atoms in protein to remain fixed for simulation
inactive 8 23 40 55 77 92 112 127 144 163 175 197 208 215 226 250 260 270 289 310 327 339 468 482 493 517 533 543 565 584 598 620 634 656 670 694 708 805 816 850 862 880 891 915 934 956 975 993 1010 1025 1037 1051 1063 1084 1103 1117 1127 1138 1157 1176 1198 1215 1230 1245 1255 1272 1296 1307 1328 1347 1366 1380 1397 1404 1418 1437 1451 1465 1479 1490 1497 1515 1535 1559 1574 1591 1607 1631 1646 1663 1685 1696 1720 1727 1743 1759 1776 1795 1809 1833 1849 1881 1903 1910 1921 1962 1973 1983 2000 2021 2045 2059 2076 2098 2113 2128 2150 2165 2182 2201 2221 2236 2248 2262 2276 2295 2317 2336 2350 2369 2388 2399 2414 2426 2445 2467 2478 2499 2520 2534 2550 2574 2591 2610 2625 2644 2659 2673 2692 2706 2720 2737 2752 2766 2790 2805 2824 2843 2861 2881 2899 2920 2934 2972 3025 3041 3055 3070 3081 3095 3105 3116 3136 3155 3169 3189 3208 3228 3250 3266 3290 3305 3316 3323 3334 3353 3364 3378 3393 3411 3418 3432 3448 3464 3480 3598 3605 3619 3639 3650 3669 3679 3691 3705 3716 3735 3754 3773 3790 3802 3824 3848 3870 3882 3896 3907 3918 3934 3946 3965 3987 4009 4025 4044 4063 4078 4119 4141 4161 4228 4278 4288 4317 4336 4360 4380 4391 4412 4431 4441 4457 4476 4491 4498 4508 4530 4550 4569 4586 4593 4605 4616 4627 4643 4660 4672 4689 4713 4735 4750 4769 4780 4798 4813

Is there something incorrect with my syntax? Also, is the 'inactive' keyword more appropriate or should I be using the 'restrain-position' keyword in my key file? I can define a group of atoms and then restrain them, but my reading of Jay's advice over in the T8 git issues https://github.com/TinkerTools/tinker/issues/73 is that I should be using the inactive keyword.

jayponder commented 6 months ago

Hi Blake,

I believe Tinker9 (the GPU code) does not implement the active/inactive mechanism. If all you want to do is minimize an isolated protein molecule, then the CPU Tinker8 should be sufficient- unless you want to do lots of such minimizations.

The GPU code is missing lots of options that are in the CPU code. The whole goal of the GPU code is to be as fast as possible for standard all-atom MD simulations. And having lots and lots of options tends to slow things down.

blakemertz commented 6 months ago

@jayponder thanks for the quick response -- really appreciated. I didn't compile the documentation for T9 when I compiled this -- should have done that, as it would have been clear that the active/inactive functionality was missing. I re-ran this system using the restrain-position variable instead, calling a group of atoms that I had defined earlier in my key file -- this is essentially what I was looking to do, and it will give me more flexibility in defining the strength of the positional restraints I impose on my selected atoms.