set topologyFilePath {/NAMD/toppar} set structureFileNameBase {mscl_s3-prefilter_closed} set startupFileNameBase {mscl_s3-prefilter_closed} # set outputFileNameBase {min-tgt_mscl_hourglass} set outputFileNameBase {min-tgt_mscl_hourglass_0.1} set numsteps 100 # Parametrization Configuration file name. Suggested to be in the same folder. Otherwise include full path set configFileName {update_parameters_conf.txt} # _________________ reading parametrization status from the configuration and status files # find what is the name of Parametrization status file and total number of steps set fileLook [open $configFileName r]; # Open configuration file set parametersFound 0 while {([gets $fileLook line] >= 0)&($parametersFound<6)} { set lineRecognize [lindex $line 0] switch -regexp $lineRecognize { "^workingFolder$" {; # Simulation files path set workingFolder [lindex $line 1] cd $workingFolder cwd $workingFolder incr parametersFound } "^statusFileName$" {; # Status file name set statusFileName [lindex $line 1] incr parametersFound } "^parametrizationStepsMax$" {; # Maximal possible number of parametrization steps, before it stops (if was not stopped earlier by other criterion). set parametrizationStepsMax [lindex $line 1] incr parametersFound } "^outputCoordinatesFileName$" {; # Output coordinates file name set outputCoordinatesFileName [lindex $line 1] incr parametersFound } "^outputConstantsFileName$" {; # Output spring constant coefficients file name set outputConstantsFileName [lindex $line 1] incr parametersFound } "^constantsColumn$" {; # Input spring constant coefficients column set constantsColumn [string tolower [lindex $line 1]] incr parametersFound } default {} } } close $fileLook # find out the last step that was performed set fileLook [open $statusFileName r]; # open configuration file set parametersFound 0 while {([gets $fileLook line] >= 0)&($parametersFound<1)} {; # read configuration file and recognize data set lineRecognize [lindex $line 0] switch -regexp $lineRecognize { "^parametrizationCyclesCompleted$" {; # Number of minimization cycles completed up to the moment set parametrizationCyclesCompleted [lindex $line 1] incr parametersFound } default {} } } close $fileLook # compose prefix and suffix for the name if {$parametrizationCyclesCompleted==0} { # This is the first cycle - start after minimization files set restartFileNameBase $startupFileNameBase set suffixIn "" } else { # this is not the first cycle set restartFileNameBase $outputFileNameBase set suffixIn [format "_%0[string length $parametrizationStepsMax]i" [expr {$parametrizationCyclesCompleted-1}]] } set suffixOut [format "_%0[string length $parametrizationStepsMax]i" $parametrizationCyclesCompleted] # _____________________________ Set simulation parameters structure $structureFileNameBase.psf coordinates $structureFileNameBase.pdb parameters $topologyFilePath/par_all27_prot_lipid_cer.inp bincoordinates $restartFileNameBase$suffixIn.coor binvelocities $restartFileNameBase$suffixIn.vel extendedSystem $restartFileNameBase$suffixIn.xsc paraTypeCharmm on fixedAtoms off constraints on consRef $outputCoordinatesFileName consKFile $outputConstantsFileName consKCol $constantsColumn # consRef mscs-cry-cor_fix-m1m2bb_b1.pdb # consKFile mscs-cry-cor_cnst.pdb # consKCol X # selectConstraints on # selectConstrX on # selectConstrY on # selectConstrZ off outputName $outputFileNameBase$suffixOut outputEnergies 10 outputTiming 10 dcdFreq 20 # restartFreq 100 xstFreq 20 # wrapAll on DCDUnitCell yes # velDCDfile xxx2 # velDCDfreq xxx3 #SHAKE settings rigidBonds all numsteps $numsteps timestep 1 nonBondedFreq 2 fullElectFrequency 4 stepsPerCycle 20 switching on switchDist 10 cutoff 12 pairlistdist 13.5 exclude scaled1-4 1-4scaling 1.0 # cellBasisVector1 130 0.0 0.0 # cellBasisVector2 65 112.583 0 # cellBasisVector3 0.0 0.0 160 # cellOrigin 00.00 00.00 -42.50 # Pme on # PmeGridsizeX 122 # PmeGridsizeY 122 # PmeGridsizeZ 160 # PmeGridsizeX 81 # PmeGridsizeY 81 # PmeGridsizeZ 125 # langevinPiston on # langevinPistonTarget 1.01325 # langevinPistonPeriod 200 # langevinPistonDecay 100 # langevinPistonTemp 310 # useGroupPressure yes # smaller fluctuations # useFlexibleCell no # Allow dimensions to fluctuate independently # langevin on # langevinDamping 10 # langevinTemp 310 # langevinHydrogen no minimization on