comparison pca_cosine.py @ 4:312f912de69d draft

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 3b99f08f22b9e0c16c0a0adc82f8c16c1a25cedf"
author chemteam
date Mon, 07 Oct 2019 12:52:40 -0400
parents 489b25966bb9
children
comparison
equal deleted inserted replaced
3:489b25966bb9 4:312f912de69d
10 import numpy as np 10 import numpy as np
11 11
12 12
13 def parse_command_line(argv): 13 def parse_command_line(argv):
14 parser = argparse.ArgumentParser() 14 parser = argparse.ArgumentParser()
15 parser.add_argument('--idcd', help='input dcd') 15 parser.add_argument('--itraj', help='input traj')
16 parser.add_argument('--ipdb', help='input pdb') 16 parser.add_argument('--istr', help='input str')
17 parser.add_argument('--itrajext', help='input traj ext')
18 parser.add_argument('--istrext', help='input str ext')
17 parser.add_argument('--icomponents', help='number of principle components') 19 parser.add_argument('--icomponents', help='number of principle components')
18 parser.add_argument('--iindex', help='index of the PC') 20 parser.add_argument('--iindex', help='index of the PC')
19 parser.add_argument('--output', help='output') 21 parser.add_argument('--output', help='output')
20 parser.add_argument('--cosout', help='cosine output') 22 parser.add_argument('--cosout', help='cosine output')
21 return parser.parse_args() 23 return parser.parse_args()
22 24
23 25
24 args = parse_command_line(sys.argv) 26 args = parse_command_line(sys.argv)
25 27
26 u = mda.Universe(args.ipdb, args.idcd, topology_format="PDB", format="DCD") 28 u = mda.Universe(args.istr, args.itraj,
29 topology_format=args.istrext, format=args.itrajext)
27 30
28 components = int(args.icomponents) 31 components = int(args.icomponents)
29 pca_index = int(args.iindex) 32 pca_index = int(args.iindex)
30 33
31 PSF_pca = pca.PCA(u, select='backbone') 34 PSF_pca = pca.PCA(u, select='backbone')