align

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: LGPL-2.1 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RMSDTraj

func RMSDTraj(mol chem.Atomer, ref *v3.Matrix, traj chem.ConcTraj, indexes []int, o *Options) ([]float64, int, error)

RMSDTraj returns the RMSD for all atoms in a structure, averaged over the trajectory traj. Frames are read in sets of cpus at the time: The read starts at the set begin/cpus and we skip a set every skip/cpu (the numbers are, of course, rounded). The RMSDs and the total number of frames read are returned, together with an error or nil.

Types

type ConcTrajCloser

type ConcTrajCloser interface {
	chem.ConcTraj
	//closes the trajectory
	Close()
}

ConcTraje is an interface for a trajectory that can be read concurrently.

type LOVOReturn

type LOVOReturn struct {
	N          int
	FramesRead int              //how many frames where actually read from the trajectory
	Natoms     []int            //IDs of the N most rigid atoms
	Nmols      []*MolIDandChain //IDs for the N most rigid residues/molecules
	RMSD       []float64        //the RMSD for all residues, not only the N most rigid.
	Iterations int              //The iterations that were needed for convergency.

}

LOVOReturn contains the information returned by LOVOnMostRigid

func LOVO

func LOVO(mol chem.Atomer, ref *v3.Matrix, trajname string, opt ...*Options) (*LOVOReturn, error)

LOVO returns slices with the indexes of the n atoms and residues most rigid from mol, along the traj trajectory, considering only atoms with names in atomnames (normally, PDB names are used) and belonging to one of the chains in chains (only the first slice given in chains will be considered, if nothing is given, atoms from any chain will be considred. If you use this function in your research, please cite the references for the LOVO alignment method: 10.1371/journal.pone.0119264. 10.1186/1471-2105-8-306 If you use this function in a to-consumer program, please print a message asking to cite the references when the function is used.

func (*LOVOReturn) GMX

func (L *LOVOReturn) GMX(chain ...string) string

Return the LOVO-selected residues in a format that can be pasted into the Gromacs gmx make_ndx tool to build a selection. The selection will incluede the residues from the chain given, and the chain ID, if given, or all residues matching, if not. The atomname (normally CA in atomistic simulations or BB in Martini ones is not added, mostly out of laziness and because it's easy to simply append " & a CA" or " & a BB" at the end of the string.

func (*LOVOReturn) Len

func (L *LOVOReturn) Len() int

func (*LOVOReturn) Less

func (L *LOVOReturn) Less(i, j int) bool

Implements Sort to sort by residue

func (*LOVOReturn) PyMOLSel

func (L *LOVOReturn) PyMOLSel() string

PyMOLSel returns a string of text to create a PyMOL selection with the L.N most rigid residues from a LOVO calculation.

func (*LOVOReturn) String

func (L *LOVOReturn) String() string

String returns a string representation of the LOVOReturn object.

func (*LOVOReturn) Swap

func (L *LOVOReturn) Swap(i, j int)

type MolIDandChain

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

func (*MolIDandChain) Chain

func (M *MolIDandChain) Chain() string

func (*MolIDandChain) MolID

func (M *MolIDandChain) MolID() int

func (*MolIDandChain) String

func (M *MolIDandChain) String() string

type Options

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

Options contains various options for the LOVOnMostRigid and RMSDTraj functions

func DefaultCGOptions

func DefaultCGOptions() *Options

DefaultCGOptions returns reasonable options for Martini trajectories.

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions return reasonable options for atomistic trajectories. It prepares a superposition of alpha carbons (CA) with all logical CPUs, trying to use for the superposition all CAs with RMSD lower than 1.0 A.

func (*Options) AtomNames

func (O *Options) AtomNames(names ...[]string) []string

Returns the atom names consiered or the alignment and sets them to new values, if those are given.

func (*Options) Begin

func (O *Options) Begin(n ...int) int

Returns the value of the first frame of the sequence to use, and sets it to a new value, if given.

func (*Options) Chains

func (O *Options) Chains(chains ...[]string) []string

Returns the atom names consiered or the alignment and sets them to new values, if those are given.

func (*Options) Cpus

func (O *Options) Cpus(n ...int) int

Returns the number of gorutines to be used, and sets it to a new value, if given.

func (*Options) LessThanRMSD

func (O *Options) LessThanRMSD(rmsd ...float64) float64

Returns the minimum RMSD for an atom to be consiered as part of the alignment, and sets it to a new value, if given. if this flag is set to 0 or less, the regular LOVO convergency criterion is used.

func (*Options) MinimumN

func (O *Options) MinimumN(n ...int) int

Returns the smallest acceptable number of atoms to be returned by the alinment procedure. Only used if the LessThanRMSD is active. and sets it to a new value, if given.

func (*Options) Skip

func (O *Options) Skip(n ...int) int

Returns the value of the skipped frames between reads, and sets it to a new value, if given.

func (*Options) TrajName

func (O *Options) TrajName(name ...string) string

Returns the name of the files where the aligned trajectory will be written, and sets it to a new value, if given. No trajectory file will be given if this value is set to an empty string.

Jump to

Keyboard shortcuts

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