LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] LAMMPS library: Gather specific atoms and insert small molecules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] LAMMPS library: Gather specific atoms and insert small molecules


From: Stephan Grein <stephan.grein@...5733...>
Date: Sat, 2 Sep 2017 01:44:54 +0200

Dear Axel,

thanks, this sounds good.

What I'm not understanding so far is,
that I thought by using something like

double *coords = (double*)lammps_extract_variable(lmp,"MYCOORDS","MYGRP");

I would get only the coordinates for the atoms in MYGRP
and thus would not have to use gmask as selector?


A last question (hopefully) concerning this:
If I run that code now with MPI (more than one proc),
I get some garbage output, like:
x[1005]=7199496020021154586587594...

Is this to be expected without using the selector?

Thanks in advance.

Best regards,
Stephan

Am 02/09/17 um 01:36 schrieb Axel Kohlmeyer:
> 
> 
> On Fri, Sep 1, 2017 at 7:14 PM, Stephan Grein
> <stephan.grein@...5733...
> <mailto:stephan.grein@...5733...>> wrote:
> 
>     Dear Axel,
> 
>     thanks for your excellent help!
> 
>     I used gatoms in the for loop, not natoms.
>     Now the question is, how could I get only
>     the x coord of the three atoms in the group
>     without checking for inequality with 0.0?
> 
> 
> ​you could pull in another atom style variable that contains the output
> of ​gmask(GROUP), which is 1 for group members and 0 for other atoms,
> and then use this variable as selector.
> 
> axel.
> 
>  
> 
> 
>     Best regards,
>     Stephan
> 
> 
> 
> -- 
> Dr. Axel Kohlmeyer  akohlmey@...24... <mailto:akohlmey@...24...>
>  http://goo.gl/1wk0
> College of Science & Technology, Temple University, Philadelphia PA, USA
> International Centre for Theoretical Physics, Trieste. Italy.

Attachment: signature.asc
Description: OpenPGP digital signature