Re: does fixedAtoms modify velocities?

From: Brian Radak (brian.radak.accts_at_gmail.com)
Date: Tue Jul 07 2015 - 12:48:23 CDT

Sorry, answered my own question. From HomePatch.C,
HomePatch::addForceToMomentum()

 if ( simParams->fixedAtomsOn ) {
    for ( int i = 0; i < numAtoms; ++i ) {

*if ( atom[i].atomFixed ) { atom[i].velocity = 0; }* else {
        BigReal recip_val = ( atom[i].mass > 0. ? dt * namd_reciprocal(
atom[i].mass ) : 0.);
        atom[i].velocity += f_use[ftag][i] * recip_val;
      }
    }
  }

Although, this seems strictly unnecessary, because of what happens in
HomePatch::addVelocitiesToPositions()

if ( simParams->fixedAtomsOn ) {
    for ( int i = 0; i < numAtoms; ++i ) {
      if *( ! atom[i].atomFixed )* atom[i].position += atom[i].velocity *
dt;
    }
  }

So the only effect here is that the kinetic energy is modified - a non-zero
velocity should still not affect the status of fixedAtoms.

On Tue, Jul 7, 2015 at 12:25 PM, Brian Radak <brian.radak.accts_at_gmail.com>
wrote:

> I'm having a hard time fully figuring out what happens when fixedAtoms is
> turned on. If velocities are read in with binVelocities, are these zeroed
> out for atoms that are frozen or are just the forces?
>
> What I'd like to have happen is that I read in coordinates and velocities
> and then run dynamics on just a portion of the system with everything else
> held as is (that is, both the coordinates and thevelocities). Based on a
> drop in the kinetic energy before and after turning on fixedAtoms, it looks
> like the velocities are all discarded. Can anyone verify this?
>
> Thanks,
> Brian
>
> --
> Brian Radak
> Postdoctoral Scholar
> University of Chicago
> Department of Biochemistry & Molecular Biology
> Gordon Center for Integrative Science, W323A
> 929 E. 57th St.
> Chicago, IL 60637-1454
> Tel: 773/834-2812
> e-mail: radak_at_uchicago.edu
>

-- 
Brian Radak
Postdoctoral Scholar
University of Chicago
Department of Biochemistry & Molecular Biology
Gordon Center for Integrative Science, W323A
929 E. 57th St.
Chicago, IL 60637-1454
Tel: 773/834-2812
e-mail: radak_at_uchicago.edu

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2015 - 23:21:57 CST