blocks

package
v0.0.0-...-83155bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2015 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HASH_KEY_SEP = "_"

Variables

View Source
var PROTONS_LIB = map[string]*atomInfo{
	"H":  &atomInfo{1, regexp.MustCompile(`^\d*H[A-Z0-9]*$`)},
	"LI": &atomInfo{3, regexp.MustCompile(`^LI[A-Z0-9]*$`)},
	"C":  &atomInfo{6, regexp.MustCompile(`^C[A-Z0-9]*$`)},
	"N":  &atomInfo{7, regexp.MustCompile(`^N[A-Z0-9]*$`)},
	"O":  &atomInfo{8, regexp.MustCompile(`^O[A-Z0-9]*$`)},
	"F":  &atomInfo{9, regexp.MustCompile(`^F[A-Z0-9]*$`)},
	"NA": &atomInfo{11, regexp.MustCompile(`^NA\d*$`)},
	"MG": &atomInfo{12, regexp.MustCompile(`^MG\d*$`)},
	"AL": &atomInfo{13, regexp.MustCompile(`^AL[A-Z0-9]*$`)},
	"P":  &atomInfo{15, regexp.MustCompile(`^P[A-Z0-9]*$`)},
	"S":  &atomInfo{16, regexp.MustCompile(`^S[A-Z0-9]*$`)},
	"CL": &atomInfo{17, regexp.MustCompile(`^CL\d*$`)},
	"K":  &atomInfo{19, regexp.MustCompile(`^K\d*$`)},
	"CA": &atomInfo{20, regexp.MustCompile(`^CA\d*$`)},
	"FE": &atomInfo{26, regexp.MustCompile(`^FE\d*$`)},
	"ZN": &atomInfo{30, regexp.MustCompile(`^ZN\d*$`)},
	"BR": &atomInfo{35, regexp.MustCompile(`^BR[A-Z0-9]*$`)},
	"RB": &atomInfo{37, regexp.MustCompile(`^RB[A-Z0-9]*$`)},
	"I":  &atomInfo{53, regexp.MustCompile(`^I[A-Z0-9]*$`)},
	"BA": &atomInfo{56, regexp.MustCompile(`^BA[A-Z0-9]*$`)},
}

Functions

func AtomNameToProtons

func AtomNameToProtons(name1 string) (int, error)

Types

type ATSetting

type ATSetting int64
const (
	AT_NULL       ATSetting = 1 << iota //
	AT_TYPE_CHM_1                       // Normal CHARMM ATOM
	AT_TYPE_GMX_1                       // Normal GROMACS ATOM
	AT_HAS_PROTONS_SET
	AT_HAS_MASS_SET
	AT_HAS_LJ_DISTANCE_SET
	AT_HAS_LJ_ENERGY_SET
	AT_HAS_LJ_DISTANCE_14_SET
	AT_HAS_LJ_ENERGY_14_SET
	AT_HAS_CHARGE_SET
	AT_HAS_PARTIAL_CHARGE_SET
	AT_HAS_RADIUS_SET
)

type Angle

type Angle struct {
	// contains filtered or unexported fields
}

func NewAngle

func NewAngle(atom1, atom2, atom3 *Atom) *Angle

func (*Angle) Atom1

func (a *Angle) Atom1() *Atom

func (*Angle) Atom2

func (a *Angle) Atom2() *Atom

func (*Angle) Atom3

func (a *Angle) Atom3() *Atom

func (*Angle) Id

func (a *Angle) Id() int64

func (*Angle) SetType

func (a *Angle) SetType(at *AngleType)

func (*Angle) Type

func (a *Angle) Type() *AngleType

type AngleType

type AngleType struct {
	// contains filtered or unexported fields
}

func NewAngleType

func NewAngleType(at1, at2, at3 string, t NTSetting) *AngleType

func (*AngleType) AType1

func (at *AngleType) AType1() string

func (*AngleType) AType2

func (at *AngleType) AType2() string

func (*AngleType) AType3

func (at *AngleType) AType3() string

func (*AngleType) ConvertTo

func (at *AngleType) ConvertTo(to NTSetting) (*AngleType, error)

func (*AngleType) HasR13Set

func (at *AngleType) HasR13Set() bool

func (*AngleType) HasThetaConstantSet

func (at *AngleType) HasThetaConstantSet() bool

func (*AngleType) HasThetaSet

func (at *AngleType) HasThetaSet() bool

func (*AngleType) HasUBConstantSet

func (at *AngleType) HasUBConstantSet() bool

func (*AngleType) R13

func (at *AngleType) R13() float64

func (*AngleType) SetR13

func (at *AngleType) SetR13(th float64)

func (*AngleType) SetTheta

func (at *AngleType) SetTheta(th float64)

func (*AngleType) SetThetaConstant

func (at *AngleType) SetThetaConstant(th float64)

func (*AngleType) SetUBConstant

func (at *AngleType) SetUBConstant(ub float64)

func (*AngleType) Setting

func (at *AngleType) Setting() NTSetting

func (*AngleType) Theta

func (at *AngleType) Theta() float64

func (*AngleType) ThetaConstant

func (at *AngleType) ThetaConstant() float64

func (*AngleType) UBConstant

func (at *AngleType) UBConstant() float64

type Atom

type Atom struct {
	// contains filtered or unexported fields
}

func NewAtom

func NewAtom(name string) *Atom

func (*Atom) AddCoord

func (a *Atom) AddCoord(c [3]float64)

coords

func (*Atom) AltLoc

func (a *Atom) AltLoc() string

func (*Atom) BFactor

func (a *Atom) BFactor() float64

func (*Atom) Bonds

func (a *Atom) Bonds() []*Bond

func (*Atom) Coords

func (a *Atom) Coords() [][3]float64

func (*Atom) Fragment

func (a *Atom) Fragment() *Fragment

func (*Atom) Id

func (a *Atom) Id() int64

func (*Atom) IsHetero

func (a *Atom) IsHetero() bool

func (*Atom) Name

func (a *Atom) Name() string

func (*Atom) Occupancy

func (a *Atom) Occupancy() float64

func (*Atom) Serial

func (a *Atom) Serial() int64

func (*Atom) SetAltLoc

func (a *Atom) SetAltLoc(v string)

func (*Atom) SetBFactor

func (a *Atom) SetBFactor(v float64)

func (*Atom) SetFragment

func (a *Atom) SetFragment(v *Fragment)

func (*Atom) SetHetero

func (a *Atom) SetHetero(v bool)

func (*Atom) SetOccupancy

func (a *Atom) SetOccupancy(v float64)

func (*Atom) SetSerial

func (a *Atom) SetSerial(s int64)

func (*Atom) SetType

func (a *Atom) SetType(v *AtomType)

func (*Atom) Type

func (a *Atom) Type() *AtomType

type AtomType

type AtomType struct {
	// contains filtered or unexported fields
}

func NewAtomType

func NewAtomType(label string, t ATSetting) *AtomType

func (*AtomType) Charge

func (at *AtomType) Charge() int

func (*AtomType) ConvertTo

func (at *AtomType) ConvertTo(to ATSetting) (*AtomType, error)

func (*AtomType) HasChargeSet

func (at *AtomType) HasChargeSet() bool

func (*AtomType) HasLJDistance14Set

func (at *AtomType) HasLJDistance14Set() bool

func (*AtomType) HasLJDistanceSet

func (at *AtomType) HasLJDistanceSet() bool

func (*AtomType) HasLJEnergy14Set

func (at *AtomType) HasLJEnergy14Set() bool

func (*AtomType) HasLJEnergySet

func (at *AtomType) HasLJEnergySet() bool

func (*AtomType) HasMassSet

func (at *AtomType) HasMassSet() bool

func (*AtomType) HasPartialChargeSet

func (at *AtomType) HasPartialChargeSet() bool

func (*AtomType) HasProtonsSet

func (at *AtomType) HasProtonsSet() bool

func (*AtomType) HasRadiusSet

func (at *AtomType) HasRadiusSet() bool

func (*AtomType) LJDistance

func (at *AtomType) LJDistance() float64

func (*AtomType) LJDistance14

func (at *AtomType) LJDistance14() float64

func (*AtomType) LJEnergy

func (at *AtomType) LJEnergy() float64

func (*AtomType) LJEnergy14

func (at *AtomType) LJEnergy14() float64

func (*AtomType) Label

func (at *AtomType) Label() string

func (*AtomType) Mass

func (at *AtomType) Mass() float64

func (*AtomType) PartialCharge

func (at *AtomType) PartialCharge() float64

func (*AtomType) Protons

func (at *AtomType) Protons() int

func (*AtomType) Radius

func (at *AtomType) Radius() float64

func (*AtomType) SetCharge

func (at *AtomType) SetCharge(v int)

func (*AtomType) SetLJDistance

func (at *AtomType) SetLJDistance(v float64)

func (*AtomType) SetLJDistance14

func (at *AtomType) SetLJDistance14(v float64)

func (*AtomType) SetLJEnergy

func (at *AtomType) SetLJEnergy(v float64)

func (*AtomType) SetLJEnergy14

func (at *AtomType) SetLJEnergy14(v float64)

func (*AtomType) SetMass

func (at *AtomType) SetMass(v float64)

func (*AtomType) SetPartialCharge

func (at *AtomType) SetPartialCharge(v float64)

func (*AtomType) SetProtons

func (at *AtomType) SetProtons(v int)

func (*AtomType) SetRadius

func (at *AtomType) SetRadius(v float64)

func (*AtomType) Setting

func (at *AtomType) Setting() ATSetting

type BTSetting

type BTSetting int64
const (
	BT_NULL BTSetting = 1 << iota
	BT_ORDER_SINGLE
	BT_ORDER_DOUBLE
	BT_ORDER_TRIPLE
	BT_TYPE_GMX_1
	BT_TYPE_CHM_1
	BT_HAS_HARMONIC_CONSTANT_SET
	BT_HAS_HARMONIC_DISTANCE_SET
)

type Bond

type Bond struct {
	// contains filtered or unexported fields
}

func NewBond

func NewBond(atom1, atom2 *Atom) *Bond

func (*Bond) Atom1

func (b *Bond) Atom1() *Atom

atoms

func (*Bond) Atom2

func (b *Bond) Atom2() *Atom

func (*Bond) Id

func (b *Bond) Id() int64

func (*Bond) SetType

func (b *Bond) SetType(bt *BondType)

func (*Bond) Type

func (b *Bond) Type() *BondType

type BondType

type BondType struct {
	// contains filtered or unexported fields
}

func NewBondType

func NewBondType(at1, at2 string, t BTSetting) *BondType

func (*BondType) AType1

func (bt *BondType) AType1() string

func (*BondType) AType2

func (bt *BondType) AType2() string

func (*BondType) ConvertTo

func (bt *BondType) ConvertTo(to BTSetting) (*BondType, error)

func (*BondType) HarmonicConstant

func (bt *BondType) HarmonicConstant() float64

func (*BondType) HarmonicDistance

func (bt *BondType) HarmonicDistance() float64

func (*BondType) HasHarmonicConstantSet

func (bt *BondType) HasHarmonicConstantSet() bool

func (*BondType) HasHarmonicDistanceSet

func (bt *BondType) HasHarmonicDistanceSet() bool

func (*BondType) IsSingle

func (bt *BondType) IsSingle() bool

func (*BondType) SetHarmonicConstant

func (bt *BondType) SetHarmonicConstant(v float64)

func (*BondType) SetHarmonicDistance

func (bt *BondType) SetHarmonicDistance(v float64)

func (*BondType) SetOrderSingle

func (bt *BondType) SetOrderSingle()

func (*BondType) Setting

func (bt *BondType) Setting() BTSetting

setting

type CMap

type CMap struct {
	// contains filtered or unexported fields
}

func NewCMap

func NewCMap(a1, a2, a3, a4, a5, a6, a7, a8 *Atom) *CMap

func (*CMap) Atom1

func (c *CMap) Atom1() *Atom

func (*CMap) Atom2

func (c *CMap) Atom2() *Atom

func (*CMap) Atom3

func (c *CMap) Atom3() *Atom

func (*CMap) Atom4

func (c *CMap) Atom4() *Atom

func (*CMap) Atom5

func (c *CMap) Atom5() *Atom

func (*CMap) Atom6

func (c *CMap) Atom6() *Atom

func (*CMap) Atom7

func (c *CMap) Atom7() *Atom

func (*CMap) Atom8

func (c *CMap) Atom8() *Atom

func (*CMap) SetType

func (c *CMap) SetType(ct *CMapType)

func (*CMap) Type

func (c *CMap) Type() *CMapType

type CMapType

type CMapType struct {
	// contains filtered or unexported fields
}

func NewCMapType

func NewCMapType(at1, at2, at3, at4, at5, at6, at7, at8 string, t CTSetting) *CMapType

func (*CMapType) AType1

func (ct *CMapType) AType1() string

func (*CMapType) AType2

func (ct *CMapType) AType2() string

func (*CMapType) AType3

func (ct *CMapType) AType3() string

func (*CMapType) AType4

func (ct *CMapType) AType4() string

func (*CMapType) AType5

func (ct *CMapType) AType5() string

func (*CMapType) AType6

func (ct *CMapType) AType6() string

func (*CMapType) AType7

func (ct *CMapType) AType7() string

func (*CMapType) AType8

func (ct *CMapType) AType8() string

func (*CMapType) ConvertTo

func (ct *CMapType) ConvertTo(to CTSetting) (*CMapType, error)

func (*CMapType) SetValues

func (ct *CMapType) SetValues(vs []float64)

func (*CMapType) Setting

func (ct *CMapType) Setting() CTSetting

func (*CMapType) Values

func (ct *CMapType) Values() []float64

type CTSetting

type CTSetting int64
const (
	CT_NULL CTSetting = 1 << iota
	CT_TYPE_CHM_1
	CT_TYPE_GMX_1
)

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

A Connection is made of two atoms.

func NewConnection

func NewConnection(atom1, atom2 *Atom) *Connection

func (*Connection) Atom1

func (c *Connection) Atom1() *Atom

func (*Connection) Atom2

func (c *Connection) Atom2() *Atom

func (*Connection) Fragment1

func (c *Connection) Fragment1() *Fragment

func (*Connection) Fragment2

func (c *Connection) Fragment2() *Fragment

type DTSetting

type DTSetting int64
const (
	DT_NULL       DTSetting = 1 << iota
	DT_TYPE_CHM_1           //
	DT_TYPE_GMX_1           // proper
	DT_TYPE_GMX_9           // prper muliple
	DT_HAS_PHI_SET
	DT_HAS_PHI_CONSTANT_SET
	DT_HAS_MULTIPLICITY_SET
)

type Dihedral

type Dihedral struct {
	// contains filtered or unexported fields
}

func NewDihedral

func NewDihedral(atom1, atom2, atom3, atom4 *Atom) *Dihedral

func (*Dihedral) Atom1

func (d *Dihedral) Atom1() *Atom

func (*Dihedral) Atom2

func (d *Dihedral) Atom2() *Atom

func (*Dihedral) Atom3

func (d *Dihedral) Atom3() *Atom

func (*Dihedral) Atom4

func (d *Dihedral) Atom4() *Atom

func (*Dihedral) Id

func (d *Dihedral) Id() int64

func (*Dihedral) SetType

func (d *Dihedral) SetType(dt *DihedralType)

func (*Dihedral) Type

func (d *Dihedral) Type() *DihedralType

type DihedralType

type DihedralType struct {
	// contains filtered or unexported fields
}

func NewDihedralType

func NewDihedralType(at1, at2, at3, at4 string, t DTSetting) *DihedralType

func (*DihedralType) AType1

func (dt *DihedralType) AType1() string

func (*DihedralType) AType2

func (dt *DihedralType) AType2() string

func (*DihedralType) AType3

func (dt *DihedralType) AType3() string

func (*DihedralType) AType4

func (dt *DihedralType) AType4() string

func (*DihedralType) ConvertTo

func (dt *DihedralType) ConvertTo(to DTSetting) (*DihedralType, error)

func (*DihedralType) HasMultiplicitySet

func (dt *DihedralType) HasMultiplicitySet() bool

func (*DihedralType) HasPhiConstantSet

func (dt *DihedralType) HasPhiConstantSet() bool

func (*DihedralType) HasPhiSet

func (dt *DihedralType) HasPhiSet() bool

func (*DihedralType) Multiplicity

func (dt *DihedralType) Multiplicity() int

func (*DihedralType) Phi

func (dt *DihedralType) Phi() float64

func (*DihedralType) PhiConstant

func (dt *DihedralType) PhiConstant() float64

func (*DihedralType) SetMultiplicity

func (dt *DihedralType) SetMultiplicity(v int)

func (*DihedralType) SetPhi

func (dt *DihedralType) SetPhi(v float64)

func (*DihedralType) SetPhiConstant

func (dt *DihedralType) SetPhiConstant(v float64)

func (*DihedralType) Setting

func (dt *DihedralType) Setting() DTSetting

type FFSetting

type FFSetting int64
const (
	FF_TYPE_CHM FFSetting = 1 << iota
	FF_TYPE_GMX
	FF_TYPE_AMB
)

type ForceField

type ForceField struct {
	// contains filtered or unexported fields
}

func NewForceField

func NewForceField(ft FFSetting) *ForceField

func (*ForceField) AddAngleType

func (ff *ForceField) AddAngleType(at *AngleType)

func (*ForceField) AddAtomType

func (ff *ForceField) AddAtomType(at *AtomType)

func (*ForceField) AddBondType

func (ff *ForceField) AddBondType(bt *BondType)

func (*ForceField) AddCMapType

func (ff *ForceField) AddCMapType(v *CMapType)

func (*ForceField) AddDihedralType

func (ff *ForceField) AddDihedralType(dt *DihedralType)

func (*ForceField) AddFragment

func (ff *ForceField) AddFragment(v *Fragment)

func (*ForceField) AddImproperType

func (ff *ForceField) AddImproperType(it *ImproperType)

func (*ForceField) AddNonBondedType

func (ff *ForceField) AddNonBondedType(nb *PairType)

func (*ForceField) AddOneFourType

func (ff *ForceField) AddOneFourType(nb *PairType)

func (*ForceField) AngleType

func (ff *ForceField) AngleType(key HashKey) *AngleType

func (*ForceField) AngleTypes

func (ff *ForceField) AngleTypes() map[HashKey]*AngleType

func (*ForceField) AtomType

func (ff *ForceField) AtomType(key HashKey) *AtomType

func (*ForceField) AtomTypes

func (ff *ForceField) AtomTypes() map[HashKey]*AtomType

func (*ForceField) BondType

func (ff *ForceField) BondType(key HashKey) *BondType

func (*ForceField) BondTypes

func (ff *ForceField) BondTypes() map[HashKey]*BondType

func (*ForceField) CMapType

func (ff *ForceField) CMapType(key HashKey) *CMapType

func (*ForceField) CMapTypes

func (ff *ForceField) CMapTypes() map[HashKey]*CMapType

func (*ForceField) DihedralType

func (ff *ForceField) DihedralType(key HashKey) *DihedralType

func (*ForceField) DihedralTypes

func (ff *ForceField) DihedralTypes() map[HashKey]*DihedralType

func (*ForceField) Errors

func (ff *ForceField) Errors() []error

func (*ForceField) Fragment

func (ff *ForceField) Fragment(key HashKey) *Fragment

func (*ForceField) Fragments

func (ff *ForceField) Fragments() map[HashKey]*Fragment

func (*ForceField) GMXSetup

func (ff *ForceField) GMXSetup() *GMXSetup

func (*ForceField) ImproperType

func (ff *ForceField) ImproperType(key HashKey) *ImproperType

func (*ForceField) ImproperTypes

func (ff *ForceField) ImproperTypes() map[HashKey]*ImproperType

func (*ForceField) NonBondedType

func (ff *ForceField) NonBondedType(key HashKey) *PairType

func (*ForceField) NonBondedTypes

func (ff *ForceField) NonBondedTypes() map[HashKey]*PairType

func (*ForceField) OneFourType

func (ff *ForceField) OneFourType(key HashKey) *PairType

func (*ForceField) OneFourTypes

func (ff *ForceField) OneFourTypes() map[HashKey]*PairType

func (*ForceField) SetGMXSetup

func (ff *ForceField) SetGMXSetup(g *GMXSetup)

func (*ForceField) Setting

func (ff *ForceField) Setting() FFSetting

type Fragment

type Fragment struct {
	// contains filtered or unexported fields
}

func NewFragment

func NewFragment(name string) *Fragment

func (*Fragment) AddAngle

func (f *Fragment) AddAngle(a *Angle)

func (*Fragment) AddAtom

func (f *Fragment) AddAtom(a *Atom)

func (*Fragment) AddBond

func (f *Fragment) AddBond(b *Bond)

func (*Fragment) AddCMap

func (f *Fragment) AddCMap(c *CMap)

func (*Fragment) AddDihedral

func (f *Fragment) AddDihedral(d *Dihedral)

func (*Fragment) AddImproper

func (f *Fragment) AddImproper(b *Improper)

func (*Fragment) Angles

func (f *Fragment) Angles() []*Angle

func (*Fragment) Atoms

func (f *Fragment) Atoms() []*Atom

func (*Fragment) Bonds

func (f *Fragment) Bonds() []*Bond

func (*Fragment) CMaps

func (f *Fragment) CMaps() []*CMap

func (*Fragment) Dihedrals

func (f *Fragment) Dihedrals() []*Dihedral

func (*Fragment) HasLinkerNext

func (f *Fragment) HasLinkerNext() bool

func (*Fragment) HasLinkerPrev

func (f *Fragment) HasLinkerPrev() bool

func (*Fragment) Id

func (f *Fragment) Id() int64

func (*Fragment) Impropers

func (f *Fragment) Impropers() []*Improper

func (*Fragment) LinkerNext

func (f *Fragment) LinkerNext() *Linker

func (*Fragment) LinkerPrev

func (f *Fragment) LinkerPrev() *Linker

func (*Fragment) Name

func (f *Fragment) Name() string

func (*Fragment) Serial

func (f *Fragment) Serial() int64

func (*Fragment) SetLinkerNext

func (f *Fragment) SetLinkerNext(l *Linker)

func (*Fragment) SetLinkerPrev

func (f *Fragment) SetLinkerPrev(l *Linker)

func (*Fragment) SetSerial

func (f *Fragment) SetSerial(s int64)

type GMXSetup

type GMXSetup struct {
	// contains filtered or unexported fields
}

func NewGMXSetup

func NewGMXSetup(nbFunc, combRule int, genPairs bool, flj, fqq float64) *GMXSetup

func (*GMXSetup) CombinationRule

func (g *GMXSetup) CombinationRule() int

func (*GMXSetup) FudgeLJ

func (g *GMXSetup) FudgeLJ() float64

func (*GMXSetup) FudgeQQ

func (g *GMXSetup) FudgeQQ() float64

func (*GMXSetup) GeneratePairs

func (g *GMXSetup) GeneratePairs() bool

func (*GMXSetup) NbFunc

func (g *GMXSetup) NbFunc() int

type HashKey

type HashKey string

func GenerateHashKey

func GenerateHashKey(v interface{}, hks HashKeySetting) HashKey

type HashKeySetting

type HashKeySetting int64
const (
	HK_MODE_NORMAL HashKeySetting = 1 << iota
	HK_MODE_REVERSE_BOND
	HK_MODE_REVERSE_ANGLE
	HK_MODE_REVERSE_DIHEDRAL
	HK_MODE_SHORT_CMAP // 5 element cmap
)

type ITSetting

type ITSetting int64
const (
	IT_NULL ITSetting = 1 << iota
	IT_TYPE_CHM_1
	IT_TYPE_GMX_2
	IT_HAS_PSI_SET
	IT_HAS_PSI_CONSTANT_SET
)

type Improper

type Improper struct {
	// contains filtered or unexported fields
}

func NewImproper

func NewImproper(atom1, atom2, atom3, atom4 *Atom) *Improper

func (*Improper) Atom1

func (d *Improper) Atom1() *Atom

func (*Improper) Atom2

func (d *Improper) Atom2() *Atom

func (*Improper) Atom3

func (d *Improper) Atom3() *Atom

func (*Improper) Atom4

func (d *Improper) Atom4() *Atom

func (*Improper) Id

func (d *Improper) Id() int64

func (*Improper) SetType

func (d *Improper) SetType(dt *ImproperType)

func (*Improper) Type

func (d *Improper) Type() *ImproperType

type ImproperType

type ImproperType struct {
	// contains filtered or unexported fields
}

func NewImproperType

func NewImproperType(at1, at2, at3, at4 string, t ITSetting) *ImproperType

func (*ImproperType) AType1

func (dt *ImproperType) AType1() string

func (*ImproperType) AType2

func (dt *ImproperType) AType2() string

func (*ImproperType) AType3

func (dt *ImproperType) AType3() string

func (*ImproperType) AType4

func (dt *ImproperType) AType4() string

func (*ImproperType) ConvertTo

func (dt *ImproperType) ConvertTo(to ITSetting) (*ImproperType, error)

func (*ImproperType) HasPsiConstantSet

func (dt *ImproperType) HasPsiConstantSet() bool

func (*ImproperType) HasPsiSet

func (dt *ImproperType) HasPsiSet() bool

func (*ImproperType) Psi

func (dt *ImproperType) Psi() float64

func (*ImproperType) PsiConstant

func (dt *ImproperType) PsiConstant() float64

func (*ImproperType) SetPsi

func (dt *ImproperType) SetPsi(v float64)

func (*ImproperType) SetPsiConstant

func (dt *ImproperType) SetPsiConstant(v float64)

func (*ImproperType) Setting

func (dt *ImproperType) Setting() ITSetting
type Link struct {
	// contains filtered or unexported fields
}

A Link can have one or more Connection.

func NewLink() *Link

func (*Link) AddConnection

func (ln *Link) AddConnection(c *Connection)

func (*Link) Connections

func (ln *Link) Connections() []*Connection

type Linker

type Linker struct {
	// contains filtered or unexported fields
}

func NewLinker

func NewLinker() *Linker

func (*Linker) Bond

func (l *Linker) Bond() *Bond

func (*Linker) Fragment1

func (l *Linker) Fragment1() *Fragment

func (*Linker) Fragment2

func (l *Linker) Fragment2() *Fragment

func (*Linker) Improper

func (l *Linker) Improper() *Improper

func (*Linker) SetBond

func (l *Linker) SetBond(b *Bond)

func (*Linker) SetFragment1

func (l *Linker) SetFragment1(frag1 *Fragment)

func (*Linker) SetFragment2

func (l *Linker) SetFragment2(frag2 *Fragment)

func (*Linker) SetImproper

func (l *Linker) SetImproper(m *Improper)

type NTSetting

type NTSetting int64
const (
	NT_NULL       NTSetting = 1 << iota
	NT_TYPE_CHM_1           // UB
	NT_TYPE_GMX_1           // Harmonic
	NT_TYPE_GMX_5           // UB
	NT_HAS_THETA_CONSTANT_SET
	NT_HAS_THETA_SET
	NT_HAS_UB_CONSTANT_SET
	NT_HAS_R13_SET
)

type PTSetting

type PTSetting int64
const (
	PT_NULL       PTSetting = 1 << iota
	PT_TYPE_CHM_1           // CHARMM NBFIX
	PT_TYPE_GMX_1           // equivalent to CHARMM NBFIX
	PT_HAS_LJ_DISTANCE_SET
	PT_HAS_LJ_ENERGY_SET
	PT_HAS_LJ_DISTANCE_14_SET
	PT_HAS_LJ_ENERGY_14_SET
)

type Pair

type Pair struct {
	// contains filtered or unexported fields
}

func NewPair

func NewPair(a1, a2 *Atom) *Pair

func (*Pair) Atom1

func (p *Pair) Atom1() *Atom

func (*Pair) Atom2

func (p *Pair) Atom2() *Atom

func (*Pair) SetType

func (p *Pair) SetType(pt *PairType)

func (*Pair) Type

func (p *Pair) Type() *PairType

type PairType

type PairType struct {
	// contains filtered or unexported fields
}

PairType is used to describe custom parameters for non-bonding interactions

func NewPairType

func NewPairType(at1, at2 string, t PTSetting) *PairType

func (*PairType) AType1

func (pt *PairType) AType1() string

func (*PairType) AType2

func (pt *PairType) AType2() string

func (*PairType) ConvertTo

func (pt *PairType) ConvertTo(to PTSetting) (*PairType, error)

func (*PairType) HasLJDistance14Set

func (pt *PairType) HasLJDistance14Set() bool

func (*PairType) HasLJDistanceSet

func (pt *PairType) HasLJDistanceSet() bool

func (*PairType) HasLJEnergy14Set

func (pt *PairType) HasLJEnergy14Set() bool

func (*PairType) HasLJEnergySet

func (pt *PairType) HasLJEnergySet() bool

func (*PairType) LJDistance

func (pt *PairType) LJDistance() float64

func (*PairType) LJDistance14

func (pt *PairType) LJDistance14() float64

func (*PairType) LJEnergy

func (pt *PairType) LJEnergy() float64

func (*PairType) LJEnergy14

func (pt *PairType) LJEnergy14() float64

func (*PairType) SetLJDistance

func (pt *PairType) SetLJDistance(v float64)

func (*PairType) SetLJDistance14

func (pt *PairType) SetLJDistance14(v float64)

func (*PairType) SetLJEnergy

func (pt *PairType) SetLJEnergy(v float64)

func (*PairType) SetLJEnergy14

func (pt *PairType) SetLJEnergy14(v float64)

func (*PairType) Setting

func (pt *PairType) Setting() PTSetting

type System

type System struct {
	// contains filtered or unexported fields
}

func NewSystem

func NewSystem() *System

func (*System) AddAngle

func (s *System) AddAngle(a *Angle)

func (*System) AddAtom

func (s *System) AddAtom(a *Atom)

func (*System) AddBond

func (s *System) AddBond(b *Bond)

func (*System) AddDihedral

func (s *System) AddDihedral(d *Dihedral)

func (*System) AddFragment

func (s *System) AddFragment(f *Fragment)

func (*System) AddImproper

func (s *System) AddImproper(b *Improper)

func (*System) Angles

func (s *System) Angles() []*Angle

func (*System) Atoms

func (s *System) Atoms() []*Atom

func (*System) Bonds

func (s *System) Bonds() []*Bond

func (*System) Dihedrals

func (s *System) Dihedrals() []*Dihedral

func (*System) Fragments

func (s *System) Fragments() []*Fragment

func (*System) Id

func (s *System) Id() int64

func (*System) Impropers

func (s *System) Impropers() []*Improper

func (*System) String

func (s *System) String() string

Directories

Path Synopsis
Package mol provides basic building blocks for molecular systems.
Package mol provides basic building blocks for molecular systems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL