UnityMol  1.0.25beta
UMol.UnityMolBonds Class Reference

Stores the bonds of the model as a dictionary of <UnityMolAtom, UnityMolAtom[]> More...

Public Member Functions

 UnityMolBonds ()
 UnityMolBonds constructor initializing the dictionary More...
 
void Add (UnityMolAtom atom, UnityMolAtom[] bonded)
 Add an array of atoms in the dictionary More...
 
void Add (UnityMolAtom atom, UnityMolAtom bonded)
 Add a UnityMolAtom in the dictionary, prints a Debug.LogError when no more space is available More...
 
int countBondedAtoms (UnityMolAtom a)
 Returns the number of atoms bonded to the atom A More...
 
bool isBondedTo (UnityMolAtom a1, UnityMolAtom a2)
 Check if atom a1 and atom a2 are bonded More...
 
List< AtomDuoToList ()
 Return a flatten list of atom couples (not from the dual dictionary) More...
 

Public Attributes

int NBBONDS = 12
 Number of bonds per atom, this should change if a Martini model is parsed More...
 
Dictionary< UnityMolAtom, UnityMolAtom[]> bonds
 Stores the bonds of the model, empty bonds are null More...
 
Dictionary< UnityMolAtom, UnityMolAtom[]> bondsDual
 Stores the bonds of the model, empty bonds are null, contains both A1+A2 and A2+A1 More...
 
int bondsCount = 0
 Total number of bonds stored More...
 

Properties

int Count [get]
 Returns the number of bonds stored More...
 
int Length [get]
 
Dictionary< UnityMolAtom, UnityMolAtom[]> Dbonds [get]
 Returns the number of bonds stored More...
 

Detailed Description

Stores the bonds of the model as a dictionary of <UnityMolAtom, UnityMolAtom[]>

Constructor & Destructor Documentation

◆ UnityMolBonds()

UMol.UnityMolBonds.UnityMolBonds ( )

UnityMolBonds constructor initializing the dictionary

Member Function Documentation

◆ Add() [1/2]

void UMol.UnityMolBonds.Add ( UnityMolAtom  atom,
UnityMolAtom []  bonded 
)

Add an array of atoms in the dictionary

◆ Add() [2/2]

void UMol.UnityMolBonds.Add ( UnityMolAtom  atom,
UnityMolAtom  bonded 
)

Add a UnityMolAtom in the dictionary, prints a Debug.LogError when no more space is available

◆ countBondedAtoms()

int UMol.UnityMolBonds.countBondedAtoms ( UnityMolAtom  a)

Returns the number of atoms bonded to the atom A

◆ isBondedTo()

bool UMol.UnityMolBonds.isBondedTo ( UnityMolAtom  a1,
UnityMolAtom  a2 
)

Check if atom a1 and atom a2 are bonded

◆ ToList()

List<AtomDuo> UMol.UnityMolBonds.ToList ( )

Return a flatten list of atom couples (not from the dual dictionary)

Member Data Documentation

◆ bonds

Dictionary<UnityMolAtom, UnityMolAtom[]> UMol.UnityMolBonds.bonds

Stores the bonds of the model, empty bonds are null

◆ bondsCount

int UMol.UnityMolBonds.bondsCount = 0

Total number of bonds stored

◆ bondsDual

Dictionary<UnityMolAtom, UnityMolAtom[]> UMol.UnityMolBonds.bondsDual

Stores the bonds of the model, empty bonds are null, contains both A1+A2 and A2+A1

◆ NBBONDS

int UMol.UnityMolBonds.NBBONDS = 12

Number of bonds per atom, this should change if a Martini model is parsed

Property Documentation

◆ Count

int UMol.UnityMolBonds.Count
get

Returns the number of bonds stored

◆ Dbonds

Dictionary<UnityMolAtom, UnityMolAtom[]> UMol.UnityMolBonds.Dbonds
get

Returns the number of bonds stored

◆ Length

int UMol.UnityMolBonds.Length
get

The documentation for this class was generated from the following file: