Adding force to atoms in each time step

Hi,

I am trying to simulate a system of particles, where in each time step
it is required to add force on all the particles present.

I am trying in the following way.
In each time step I have the updated configuration (positions) of all of
them. In my own code I am generating a file which contains the values
of the force that I am trying to add on them.
Now, this force values do not have any correlation or any dependency
from which I can use any tricks to incorporate all of them by a single
command line. So, the only option available is to read the file and apply
the force using 'variable' and 'fix add force' command one by one.
But, when there are millions of particles are there, it becomes too lengthy
to carry on. And for that I had to create the same no of 'groups' to
demarcate them.

Is there any other way around options left ?

Best,

2014-11-09 23:26 GMT+01:00 Saikat Basu <[email protected]>:

Hi,

I am trying to simulate a system of particles, where in each time step
it is required to add force on all the particles present.

I am trying in the following way.
In each time step I have the updated configuration (positions) of all of
them. In my own code I am generating a file which contains the values
of the force that I am trying to add on them.

I don't know how complex the calculation of this force is, but the usecase
you're describing is usually accomplished by using a fix, so you might
consider writing one.

Kristof

2014-11-09 23:26 GMT+01:00 Saikat Basu <[email protected]>:

Hi,

I am trying to simulate a system of particles, where in each time step
it is required to add force on all the particles present.

I am trying in the following way.
In each time step I have the updated configuration (positions) of all of
them. In my own code I am generating a file which contains the values
of the force that I am trying to add on them.

I don't know how complex the calculation of this force is, but the usecase
you're describing is usually accomplished by using a fix, so you might
consider writing one.

even with a custom fix, no sane person will want to read data for
"millions of particles" from a file. even more so, if it is a
formatted (text) file.

>
>
> 2014-11-09 23:26 GMT+01:00 Saikat Basu <[email protected]>:
>>
>>
>> Hi,
>>
>> I am trying to simulate a system of particles, where in each time step
>> it is required to add force on all the particles present.
>>
>> I am trying in the following way.
>> In each time step I have the updated configuration (positions) of all
of
>> them. In my own code I am generating a file which contains the values
>> of the force that I am trying to add on them.
>
>
> I don't know how complex the calculation of this force is, but the
usecase
> you're describing is usually accomplished by using a fix, so you might
> consider writing one.

even with a custom fix, no sane person will want to read data for
"millions of particles" from a file. even more so, if it is a
formatted (text) file.

Of course, so I'll clarify: "use a fix to calculate and apply those
forces", provided these are *additional* and not the only forces acting on
the particles, because in that case pair style would be more appropriate.

Kristof