Particle set

class ParticleSet(all_info, keyword)

The constructor of particle set object with keyword.

Parameters:
  • all_info (AllInfo) – The system information.
  • keyword (str) – The candidates of keyword are “all”, “body”, “non_body”, “charge”, and the string of particle type.
class ParticleSet(all_info, min, max)

The constructor of particle set object with keyword.

Parameters:
  • all_info (AllInfo) – The system information.
  • min (int) – The particle index range from min to max.
  • max (int) – The particle index range from min to max.
class ParticleSet(all_info, members_list)

The constructor of particle set object with python object.

Parameters:
  • all_info (AllInfo) – The system information.
  • members_list (PyObject*) – The Python object. Note: multiple keywords and particle index can be included in Python object
class ParticleSet(all_info, member_tags)

The constructor of particle set object with a vector of particle tags.

Parameters:
  • all_info (AllInfo) – The system information.
  • member_tags (vector<unsigned_int>) – A vector of particle tags
ParticleSet combine(ParticleSet group1, ParticleSet group2)

combines two particle groups into one.

Example:

groupC = galamost.ParticleSet(all_info,'C')
# initializes a particle set object by a particle type.

group = galamost.ParticleSet(all_info,['A', 'B', 'C'])
# initializes a particle set object by particle types

groupB = galamost.ParticleSet(all_info,'body')
# initializes a particle set object of body particles by 'body'.

group_e = galamost.ParticleSet(all_info,'charge')
# initializes a particle set object of charged particles by 'charge'.

groupC = galamost.ParticleSet(all_info,'all')
# initializes a particle set object of all particles by 'all'.

group= galamost.ParticleSet(all_info, ['A', 12, 'body'])
# initializes a particle set object of particles by mixed keywords.

groupAB= galamost.ParticleSet.combine(groupA, groupB)
# combines two particle sets into one set.