示例#1
0
文件: amber.go 项目: ttjoseph/mmdevel
// Converts a Vector of strings to an array of int.
func VectorAsIntArray(v []string) []int {
	data := make([]int, len(v))
	for i := 0; i < len(v); i++ {
		x := strings.TrimSpace(v[i])
		data[i] = what.Atoi(x)
	}
	return data
}
示例#2
0
文件: amber.go 项目: ttjoseph/mmdevel
// Returns the number of atoms the prmtop expects there to be
func (mol *System) NumAtoms() int {
	x := mol.Blocks["POINTERS"][0]
	val := what.Atoi(strings.TrimSpace(x))
	return val
}
示例#3
0
文件: amber.go 项目: ttjoseph/mmdevel
// Gets an int at specified offset in specified block.
func (mol *System) GetInt(blockName string, index int) int {
	s := mol.Blocks[blockName][index]
	val := what.Atoi(s)
	return val
}