ParticleList and ParticleTypeList

class tissue_forge.ParticleList(*args)

A special list with convenience methods for working with sets of particles.

property virial

Virial tensor of particles in list

property radius_of_gyration

Radius of gyration of particles in list

property center_of_mass

Center of mass of particles in list

property centroid

Centroid of particles in list

property moment_of_inertia

Moment of inertia of particles in list

property positions

Position of each particle in list

property velocities

Velocity of each particle in list

property forces

Net forces acting on each particle in list

property ownsdata: bool

Whether the list owns its data

property mutable: bool

Whether the list is mutable

has(*args)

Overload 1: Test whether the list has an id


Overload 2: Test whether the list has a particle

__len__() int
__getitem__(i: int)
__contains__(item)
reserve(_nr_parts)

Reserve enough storage for a given number of items.

Parameters:

_nr_parts (int) – number of items

Return type:

int

Returns:

HRESULT

insert(*args)

Inserts the given particle into the list, returns the index of the item.

Parameters:

particle (ParticleHandle) – particle to insert

Return type:

int

Returns:

uint16_t

remove(id)

looks for the item with the given id and deletes it form the list

Parameters:

id (int) – id to remove

Return type:

int

Returns:

uint16_t

extend(other)

inserts the contents of another list

Parameters:

other (ParticleList) – another list

item(i)

looks for the item at the given index and returns it if found, otherwise returns NULL

Parameters:

i (int) – index of lookup

Return type:

ParticleHandle

Returns:

ParticleHandle*

vector()

returns the list as a vector

static all()

returns an instance populated with all current particles

Return type:

ParticleList

Returns:

ParticleList*

sphericalPositions(origin=None)

Get the spherical coordinates of each particle

Parameters:

origin (FVector3, optional) – optional origin of coordinates; default is center of universe

Return type:

std::vector< TissueForge::FVector3,std::allocator< TissueForge::FVector3 > >

Returns:

std::vector<FVector3>

toString()

Get a JSON string representation

Return type:

string

Returns:

std::string

static fromString(str)

Create from a JSON string representation

Parameters:

str (string)

Return type:

ParticleList

Returns:

ParticleList*

__reduce__()

Helper for pickle.

class tissue_forge.ParticleTypeList(*args)

A special list with convenience methods for working with sets of particle types.

property virial

Virial tensor of particles corresponding to all types in list

property radius_of_gyration

Radius of gyration of particles corresponding to all types in list

property center_of_mass

Center of mass of particles corresponding to all types in list

property centroid

Centroid of particles corresponding to all types in list

property moment_of_inertia

Moment of inertia of particles corresponding to all types in list

property positions

Position of each particle corresponding to all types in list

property velocities

Velocity of each particle corresponding to all types in list

property forces

Total net force acting on each particle corresponding to all types in list

property ownsdata: bool

Whether the list owns its data

property mutable: bool

Whether the list is mutable

has(*args)

Overload 1: Test whether the list has an id


Overload 2: Test whether the list has a particle type


Overload 3: Test whether the list has a particle

__len__() int
__getitem__(i: int)
__contains__(item)
reserve(_nr_parts)

Reserve enough storage for a given number of items.

Parameters:

_nr_parts (int) – number of items

Return type:

int

Returns:

HRESULT

insert(*args)

Inserts the given particle type into the list, returns the index of the item.

Parameters:

ptype (ParticleType)

Return type:

int

Returns:

uint16_t

remove(id)

looks for the item with the given id and deletes it form the list

Parameters:

id (int) – id to remove

Return type:

int

Returns:

uint16_t

extend(other)

inserts the contents of another list

Parameters:

other (ParticleTypeList) – another list

item(i)

looks for the item at the given index and returns it if found, otherwise returns NULL

Parameters:

i (int) – index of lookup

Return type:

ParticleType

Returns:

ParticleType*

vector()

returns the list as a vector

static all()

returns an instance populated with all current particle types

Return type:

ParticleTypeList

Returns:

ParticleTypeList*

sphericalPositions(origin=None)

Get the spherical coordinates of each particle

Parameters:

origin (FVector3, optional) – optional origin of coordinates; default is center of universe

Return type:

std::vector< TissueForge::FVector3,std::allocator< TissueForge::FVector3 > >

Returns:

std::vector<FVector3>

toString()

Get a JSON string representation

Return type:

string

Returns:

std::string

static fromString(str)

Create from a JSON string representation

Parameters:

str (string)

Return type:

ParticleTypeList

Returns:

ParticleTypeList*

__reduce__()

Helper for pickle.