From 6e01a43ed28c6da7eb53a99e7f0a5fead57b0b4d Mon Sep 17 00:00:00 2001 From: Charlie Laughton Date: Thu, 28 Jan 2016 14:33:15 +0000 Subject: [PATCH 1/6] Modified to use ExTASY wrappers --- .gitignore | 2 - bin/dmdmd | 116 --- dmdmd/reweighting.py | 17 +- dmdmd/tools/p_mdrun.py | 14 +- examples/dmdmd/README | 7 + examples/dmdmd/ffG43a1.itp | 4 +- examples/dmdmd/mdout.mdp | 355 +++++++ examples/dmdmd/rundmdmd.py | 76 ++ examples/dmdmd/topol.top | 5 +- examples/dmdmd_ala12/README | 7 + examples/dmdmd_ala12/grompp.mdp | 59 ++ examples/dmdmd_ala12/lsdmap.ini | 17 + examples/dmdmd_ala12/mdout.mdp | 355 +++++++ examples/dmdmd_ala12/results/iter0.ev | 50 + examples/dmdmd_ala12/results/iter1.ev | 50 + examples/dmdmd_ala12/results/iter2.ev | 50 + examples/dmdmd_ala12/results/iter3.ev | 50 + examples/dmdmd_ala12/results/iter4.ev | 50 + examples/dmdmd_ala12/rundmdmd.py | 74 ++ examples/dmdmd_ala12/scriptlsdmap.py | 46 + examples/dmdmd_ala12/scriptrgrmsd.py | 43 + examples/dmdmd_ala12/start.gro | 135 +++ examples/dmdmd_ala12/topol.top | 1224 +++++++++++++++++++++++++ examples/lsdmap/aladip.gro | 25 + examples/lsdmap/dihedral.sh | 11 - lsdmap/lsdm.py | 143 ++- lsdmap/rw/x2h.py | 292 ++++++ 27 files changed, 3096 insertions(+), 181 deletions(-) delete mode 100644 bin/dmdmd create mode 100644 examples/dmdmd/README create mode 100644 examples/dmdmd/mdout.mdp create mode 100644 examples/dmdmd/rundmdmd.py create mode 100644 examples/dmdmd_ala12/README create mode 100644 examples/dmdmd_ala12/grompp.mdp create mode 100755 examples/dmdmd_ala12/lsdmap.ini create mode 100644 examples/dmdmd_ala12/mdout.mdp create mode 100644 examples/dmdmd_ala12/results/iter0.ev create mode 100644 examples/dmdmd_ala12/results/iter1.ev create mode 100644 examples/dmdmd_ala12/results/iter2.ev create mode 100644 examples/dmdmd_ala12/results/iter3.ev create mode 100644 examples/dmdmd_ala12/results/iter4.ev create mode 100644 examples/dmdmd_ala12/rundmdmd.py create mode 100644 examples/dmdmd_ala12/scriptlsdmap.py create mode 100644 examples/dmdmd_ala12/scriptrgrmsd.py create mode 100644 examples/dmdmd_ala12/start.gro create mode 100644 examples/dmdmd_ala12/topol.top create mode 100644 examples/lsdmap/aladip.gro delete mode 100755 examples/lsdmap/dihedral.sh create mode 100644 lsdmap/rw/x2h.py diff --git a/.gitignore b/.gitignore index 0a4f2b5..f352b31 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,3 @@ build/ *.h *.cpp *.swp -bin/* -examples/* diff --git a/bin/dmdmd b/bin/dmdmd deleted file mode 100644 index 62c8364..0000000 --- a/bin/dmdmd +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash - -usage() -{ -cat << EOF -dmdmd: run Extended Diffusion-Map-directed Molecular Dynamics - -options: - --f : dmdmd configuration file - -EOF -} - -while getopts "h?f:" opt -do - case $opt in - h|\?) usage; exit 0;; - f) prmfile=$OPTARG;; - \?)echo "Invalid option: -$OPTARG"; exit 1;; - esac -done - -set -e -source $prmfile - -# prepare p_mdrun options -if [[ ! -z $grompp_options ]]; then - p_mdrun_options=$p_mdrun_options" --grompp_options=\"$grompp_options\"" -fi - -if [[ ! -z $mdrun_options ]]; then - p_mdrun_options=$p_mdrun_options" --mdrun_options=\"$mdrun_options\"" -fi - -if [[ ! -z $other_options ]]; then - p_mdrun_options=$p_mdrun_options" $other_options" -fi - -if [[ ! -z $ndxfile ]]; then - p_mdrun_options=$p_mdrun_options" -n $ndxfile" -fi - -if [[ ! -z $tmpdir ]]; then - p_mdrun_options=$p_mdrun_options" -t $tmpdir" -fi - -# prepare reweighting options -if [[ ! -z $max_alive_neighbors ]]; then - reweighting_options=$reweighting_options" --max_alive_neighbors=\"$max_alive_neighbors\"" -fi - -if [[ ! -z $max_dead_neighbors ]]; then - reweighting_options=$reweighting_options" --max_dead_neighbors=\"$max_dead_neighbors\"" -fi - -if [[ -z $ingro ]]; then - ingro=input.gro -fi - -if [[ -z $wfile ]]; then - wfile=weight.w -fi - -# if first iteration, build input .gro file and remove previous results (folder results) and possible wfile -if [ $iter -eq 0 ]; then - rm -rf $ingro - for idx in `seq 1 $nreplicas`; do - cat $startgro >> $ingro - done - rm -rf $wfile - rm -rf backup.w - rm -rf results - mkdir results -fi - -echo - -for i in `seq 1 $niters` ; do - - tcpu1=$(date +%s) - - echo -e "Iteration $(($iter + $i)): \n" - - # 1) MD step - echo "(1) Compute MD" - eval mpiexec -n $nthreads p_mdrun -f $mdpfile -p $topfile -c $ingro -o tmp.gro $p_mdrun_options - echo - - # 2) LSDMap step - echo "(2) Compute diffusion coordinates" - echo 2 | trjconv -f tmp.gro -s tmp.gro -o tmpha.gro &>/dev/null - mpiexec -n $nthreads lsdmap -f $inifile -c tmpha.gro -w $wfile -n tmp.nn - echo - - # 3) selection step - echo "(3) Select new points according to diffusion coordinates" - selection $nreplicas -s tmpha.ev -o ncopies.nc - echo - - # 4) reweighting step - echo "(4) Update Boltzmann weights" - if [ $(($iter + $i)) -gt 1 ]; then cp $wfile backup.w; fi - eval reweighting -c tmp.gro -n tmp.nn -s ncopies.nc -w $wfile -o out.gro $reweighting_options - echo - - mv out.gro $ingro - - if [ $((($iter + $i) % $nsave)) == 0 ]; then - cp tmpha.gro results/iter$((iter + $i)).gro - if [ $(($iter + $i)) -gt 0 ]; then cp backup.w results/iter$((iter + $i)).w; fi - fi - - sed -i 's/iter=.*/iter='"$(($iter + $i))"'/g' $prmfile - -done diff --git a/dmdmd/reweighting.py b/dmdmd/reweighting.py index f37a377..f3fa612 100644 --- a/dmdmd/reweighting.py +++ b/dmdmd/reweighting.py @@ -18,11 +18,11 @@ class ReweightingStep(object): def initialize(self, args): # read structure file - struct_file = reader.open(args.struct_file, velocities=True) - self.struct_filename = struct_file.filename - self.coords = struct_file.readlines() + with open(args.struct_file[0]) as f: + + self.coords = f.readlines() - self.npoints = self.coords.shape[0] + self.npoints = len(self.coords) # read number of copies ncfile = reader.open(args.ncfile) @@ -118,9 +118,10 @@ def get_nneighbors(self, nnfile_name, line): def save(self, args): # save new coordinates - format_output_file = os.path.splitext(args.output_file[0])[1] - struct_file_writer = writer.open(format_output_file, pattern=args.struct_file[0]) - struct_file_writer.write(self.new_coords, args.output_file[0]) + struct_file_writer = open(args.output_file[0], 'w') + for s in self.new_coords: + struct_file_writer.write(s) + struct_file_writer.close() # save wfile wfile_writer = writer.open('.w') @@ -202,6 +203,8 @@ def run(self): self.new_coords = np.array(new_coords) self.new_weights = np.array(new_weights) + + print "number of simulations in next step:", self.new_weights.shape[0] sum_old_weights=int(round(np.sum(self.weights))) sum_new_weights=int(round(np.sum(self.new_weights))) diff --git a/dmdmd/tools/p_mdrun.py b/dmdmd/tools/p_mdrun.py index 7d675c4..34ddb66 100644 --- a/dmdmd/tools/p_mdrun.py +++ b/dmdmd/tools/p_mdrun.py @@ -9,7 +9,7 @@ class ParallelMDruns(object): ##TICA - def write_script(self, script, directory, rank, mdpfile, grofile, topfile, output_grofile, start_coord, num_coord, tprfile='topol.tpr', trrfile='traj.trr', edrfile='ener.edr', shebang='/bin/bash', ndxfile='', grompp_options='', mdrun_options=''): + def write_script(self, script, directory, rank, mdpfile, grofile, topfile, output_grofile, start_coord, num_coord, tprfile='topol.tpr', trrfile='traj.trr', edrfile='ener.edr', shebang='/bin/bash', ndxfile='', grompp_options='', mdrun_options='', gmx_suffix=''): ##TICA frame_designation_path = directory + '/' + 'frame_desig.txt' with open(frame_designation_path, 'w') as fiile: @@ -48,8 +48,8 @@ def write_script(self, script, directory, rank, mdpfile, grofile, topfile, outpu sed "$start"','"$end"'!d' $startgro > $tmpstartgro # gromacs preprocessing & MD - grompp %(grompp_options)s -f %(mdpfile)s -c $tmpstartgro -p %(topfile)s %(ndxfile_option)s -o %(tprfile)s 1>/dev/null 2>/dev/null - mdrun -nt 1 %(mdrun_options)s -s %(tprfile)s -o %(trrfile)s -e %(edrfile)s 1>/dev/null 2>/dev/null + grompp%(gmx_suffix)s %(grompp_options)s -f %(mdpfile)s -c $tmpstartgro -p %(topfile)s %(ndxfile_option)s -o %(tprfile)s 1>/dev/null 2>/dev/null + mdrun%(gmx_suffix)s -nt 1 %(mdrun_options)s -s %(tprfile)s -o %(trrfile)s -e %(edrfile)s 1>/dev/null 2>/dev/null # store data cat confout.gro >> $outgro @@ -128,6 +128,10 @@ def create_arg_parser(self): type=str, dest="tmpdir") + parser.add_argument("--gmx_suffix", + type=str, + default="") + return parser def copy_additional_files(self, afiles, rundir): @@ -299,7 +303,7 @@ def run(self): script = 'run.sh' self.write_script(script, rundir, rank, 'grompp.mdp', 'start.gro', 'topol.top', 'out.gro', thread_start_coord, thread_num_coord,\ - ndxfile=args.ndxfile, grompp_options=args.grompp_options, mdrun_options=args.mdrun_options) ##TICA + ndxfile=args.ndxfile, grompp_options=args.grompp_options, mdrun_options=args.mdrun_options, gmx_suffix=args.gmx_suffix) ##TICA comm.Barrier() @@ -326,6 +330,6 @@ def run(self): print >> output_file, line.replace("\n", "") print "Output data have been saved in %s" %args.output_file - + return if __name__ == '__main__': ParallelMDruns().run() diff --git a/examples/dmdmd/README b/examples/dmdmd/README new file mode 100644 index 0000000..911de3b --- /dev/null +++ b/examples/dmdmd/README @@ -0,0 +1,7 @@ +Example DMDMD run on PYP. Two cycles, 50 replicas per cycle. + +To run: + +setenv GMX_MAXBACKUP -1 +python rundmdmd.py + diff --git a/examples/dmdmd/ffG43a1.itp b/examples/dmdmd/ffG43a1.itp index 660dced..0b5ba57 100644 --- a/examples/dmdmd/ffG43a1.itp +++ b/examples/dmdmd/ffG43a1.itp @@ -1,9 +1,9 @@ #define _FF_GROMOS96 #define _FF_GROMOS43A1 -[ defaults ] +;[ defaults ] ; nbfunc comb-rule gen-pairs fudgeLJ fudgeQQ - 1 1 no 1.0 1.0 +; 1 1 no 1.0 1.0 #include "ffG43a1nb.itp" #include "ffG43a1bon.itp" diff --git a/examples/dmdmd/mdout.mdp b/examples/dmdmd/mdout.mdp new file mode 100644 index 0000000..d2cae63 --- /dev/null +++ b/examples/dmdmd/mdout.mdp @@ -0,0 +1,355 @@ +; +; File 'mdout.mdp' was generated +; By user: charlie (1123) +; On host: tirith.pharm.nottingham.ac.uk +; At date: Thu Jan 28 14:10:30 2016 + +; + +; VARIOUS PREPROCESSING OPTIONS +; Preprocessor information: use cpp syntax. +; e.g.: -I/home/joe/doe -I/home/mary/roe +include = +; e.g.: -DPOSRES -DFLEXIBLE (note these variable names are case sensitive) +define = + +; RUN CONTROL PARAMETERS +integrator = md +; Start time and timestep in ps +tinit = 0.0 +dt = 0.002 +nsteps = 500 +; For exact run continuation or redoing part of a run +init-step = 0 +; Part index is updated automatically on checkpointing (keeps files separate) +simulation-part = 1 +; mode for center of mass motion removal +comm-mode = Linear +; number of steps for center of mass motion removal +nstcomm = 1 +; group(s) for center of mass motion removal +comm-grps = + +; LANGEVIN DYNAMICS OPTIONS +; Friction coefficient (amu/ps) and random seed +bd-fric = 0 +ld_seed = -1 + +; ENERGY MINIMIZATION OPTIONS +; Force tolerance and initial step-size +emtol = 10 +emstep = 0.01 +; Max number of iterations in relax-shells +niter = 20 +; Step size (ps^2) for minimization of flexible constraints +fcstep = 0 +; Frequency of steepest descents steps when doing CG +nstcgsteep = 1000 +nbfgscorr = 10 + +; TEST PARTICLE INSERTION OPTIONS +rtpi = 0.05 + +; OUTPUT CONTROL OPTIONS +; Output frequency for coords (x), velocities (v) and forces (f) +nstxout = 0 +nstvout = 0 +nstfout = 0 +; Output frequency for energies to log file and energy file +nstlog = 0 +nstcalcenergy = 100 +nstenergy = 0 +; Output frequency and precision for .xtc file +nstxout-compressed = 0 +compressed-x-precision = 10000 +; This selects the subset of atoms for the compressed +; trajectory file. You can select multiple groups. By +; default, all atoms will be written. +compressed-x-grps = +; Selection of energy groups +energygrps = + +; NEIGHBORSEARCHING PARAMETERS +; cut-off scheme (Verlet: particle based cut-offs, group: using charge groups) +cutoff-scheme = Verlet +; nblist update frequency +nstlist = 10 +; ns algorithm (simple or grid) +ns_type = grid +; Periodic boundary conditions: xyz, no, xy +pbc = xyz +periodic-molecules = no +; Allowed energy error due to the Verlet buffer in kJ/mol/ps per atom, +; a value of -1 means: use rlist +verlet-buffer-tolerance = 0.005 +; nblist cut-off +rlist = 1.1 +; long-range cut-off for switched potentials +rlistlong = -1 +nstcalclr = -1 + +; OPTIONS FOR ELECTROSTATICS AND VDW +; Method for doing electrostatics +coulombtype = PME +coulomb-modifier = Potential-shift-Verlet +rcoulomb_switch = 0.0 +rcoulomb = 1.1 +; Relative dielectric constant for the medium and the reaction field +epsilon_r = 1 +epsilon-rf = 0 +; Method for doing Van der Waals +vdw_type = cut-off +vdw-modifier = Potential-shift-Verlet +; cut-off lengths +rvdw_switch = 0.0 +rvdw = 1.1 +; Apply long range dispersion corrections for Energy and Pressure +DispCorr = No +; Extension of the potential lookup tables beyond the cut-off +table-extension = 1 +; Separate tables between energy group pairs +energygrp-table = +; Spacing for the PME/PPPM FFT grid +fourierspacing = 0.12 +; FFT grid size, when a value is 0 fourierspacing will be used +fourier-nx = 0 +fourier-ny = 0 +fourier-nz = 0 +; EWALD/PME/PPPM parameters +pme-order = 4 +ewald-rtol = 1e-05 +ewald-rtol-lj = 0.001 +lj-pme-comb-rule = Geometric +ewald-geometry = 3d +epsilon-surface = 0 + +; IMPLICIT SOLVENT ALGORITHM +implicit-solvent = No + +; GENERALIZED BORN ELECTROSTATICS +; Algorithm for calculating Born radii +gb-algorithm = Still +; Frequency of calculating the Born radii inside rlist +nstgbradii = 1 +; Cutoff for Born radii calculation; the contribution from atoms +; between rlist and rgbradii is updated every nstlist steps +rgbradii = 1 +; Dielectric coefficient of the implicit solvent +gb-epsilon-solvent = 80 +; Salt concentration in M for Generalized Born models +gb-saltconc = 0 +; Scaling factors used in the OBC GB model. Default values are OBC(II) +gb-obc-alpha = 1 +gb-obc-beta = 0.8 +gb-obc-gamma = 4.85 +gb-dielectric-offset = 0.009 +sa-algorithm = Ace-approximation +; Surface tension (kJ/mol/nm^2) for the SA (nonpolar surface) part of GBSA +; The value -1 will set default value for Still/HCT/OBC GB-models. +sa-surface-tension = -1 + +; OPTIONS FOR WEAK COUPLING ALGORITHMS +; Temperature coupling +tcoupl = v-rescale +nsttcouple = -1 +nh-chain-length = 10 +print-nose-hoover-chain-variables = no +; Groups to couple separately +tc-grps = Protein solvent +; Time constant (ps) and reference temperature (K) +tau_t = 0.2 0.2 +ref_t = 298 298 +; pressure coupling +Pcoupl = Parrinello-Rahman +Pcoupltype = isotropic +nstpcouple = -1 +; Time constant (ps), compressibility (1/bar) and reference P (bar) +tau_p = 1.0 +compressibility = 4.5e-5 +ref_p = 1.0 +; Scaling of reference coordinates, No, All or COM +refcoord-scaling = No + +; OPTIONS FOR QMMM calculations +QMMM = no +; Groups treated Quantum Mechanically +QMMM-grps = +; QM method +QMmethod = +; QMMM scheme +QMMMscheme = normal +; QM basisset +QMbasis = +; QM charge +QMcharge = +; QM multiplicity +QMmult = +; Surface Hopping +SH = +; CAS space options +CASorbitals = +CASelectrons = +SAon = +SAoff = +SAsteps = +; Scale factor for MM charges +MMChargeScaleFactor = 1 +; Optimization of QM subsystem +bOPT = +bTS = + +; SIMULATED ANNEALING +; Type of annealing for each temperature group (no/single/periodic) +annealing = +; Number of time points to use for specifying annealing in each group +annealing-npoints = +; List of times at the annealing points for each group +annealing-time = +; Temp. at each annealing point, for each group. +annealing-temp = + +; GENERATE VELOCITIES FOR STARTUP RUN +gen_vel = yes +gen_temp = 298 +gen_seed = -1 + +; OPTIONS FOR BONDS +constraints = all-bonds +; Type of constraint algorithm +constraint_algorithm = Lincs +; Do not constrain the start configuration +continuation = no +; Use successive overrelaxation to reduce the number of shake iterations +Shake-SOR = no +; Relative tolerance of shake +shake-tol = 0.0001 +; Highest order in the expansion of the constraint coupling matrix +lincs_order = 4 +; Number of iterations in the final step of LINCS. 1 is fine for +; normal simulations, but use 2 to conserve energy in NVE runs. +; For energy minimization with constraints it should be 4 to 8. +lincs-iter = 1 +; Lincs will write a warning to the stderr if in one step a bond +; rotates over more degrees than +lincs_warnangle = 30 +; Convert harmonic bonds to morse potentials +morse = no + +; ENERGY GROUP EXCLUSIONS +; Pairs of energy groups for which all non-bonded interactions are excluded +energygrp-excl = + +; WALLS +; Number of walls, type, atom types, densities and box-z scale factor for Ewald +nwall = 0 +wall-type = 9-3 +wall-r-linpot = -1 +wall-atomtype = +wall-density = +wall-ewald-zfac = 3 + +; COM PULLING +pull = no + +; ENFORCED ROTATION +; Enforced rotation: No or Yes +rotation = no + +; Group to display and/or manipulate in interactive MD session +IMD-group = + +; NMR refinement stuff +; Distance restraints type: No, Simple or Ensemble +disre = No +; Force weighting of pairs in one distance restraint: Conservative or Equal +disre-weighting = Conservative +; Use sqrt of the time averaged times the instantaneous violation +disre-mixed = no +disre-fc = 1000 +disre-tau = 0 +; Output frequency for pair distances to energy file +nstdisreout = 100 +; Orientation restraints: No or Yes +orire = no +; Orientation restraints force constant and tau for time averaging +orire-fc = 0 +orire-tau = 0 +orire-fitgrp = +; Output frequency for trace(SD) and S to energy file +nstorireout = 100 + +; Free energy variables +free-energy = no +couple-moltype = +couple-lambda0 = vdw-q +couple-lambda1 = vdw-q +couple-intramol = no +init-lambda = -1 +init-lambda-state = -1 +delta-lambda = 0 +nstdhdl = 50 +fep-lambdas = +mass-lambdas = +coul-lambdas = +vdw-lambdas = +bonded-lambdas = +restraint-lambdas = +temperature-lambdas = +calc-lambda-neighbors = 1 +init-lambda-weights = +dhdl-print-energy = no +sc-alpha = 0 +sc-power = 1 +sc-r-power = 6 +sc-sigma = 0.3 +sc-coul = no +separate-dhdl-file = yes +dhdl-derivatives = yes +dh_hist_size = 0 +dh_hist_spacing = 0.1 + +; Non-equilibrium MD stuff +acc-grps = +accelerate = +freezegrps = +freezedim = +cos-acceleration = 0 +deform = + +; simulated tempering variables +simulated-tempering = no +simulated-tempering-scaling = geometric +sim-temp-low = 300 +sim-temp-high = 300 + +; Electric fields +; Format is number of terms (int) and for all terms an amplitude (real) +; and a phase angle (real) +E-x = +; Time dependent (pulsed) electric field. Format is omega, time for pulse +; peak, and sigma (width) for pulse. Sigma = 0 removes pulse, leaving +; the field to be a cosine function. +E-xt = +E-y = +E-yt = +E-z = +E-zt = + +; Ion/water position swapping for computational electrophysiology setups +; Swap positions along direction: no, X, Y, Z +swapcoords = no + +; AdResS parameters +adress = no + +; User defined thingies +user1-grps = +user2-grps = +userint1 = 0 +userint2 = 0 +userint3 = 0 +userint4 = 0 +userreal1 = 0 +userreal2 = 0 +userreal3 = 0 +userreal4 = 0 diff --git a/examples/dmdmd/rundmdmd.py b/examples/dmdmd/rundmdmd.py new file mode 100644 index 0000000..24b7523 --- /dev/null +++ b/examples/dmdmd/rundmdmd.py @@ -0,0 +1,76 @@ +from wrappers import grompp, mdrun, lsdmap, selection, reweighting +from wrappers.tools import pack +import dask.bag as db +import shutil + +start = 'start.gro' +topol = 'topol.top' +mdp = 'grompp.mdp' +lsdmap_config = 'lsdmap.ini' +atom_selection = "'not element == H'" +nreps = 50 +ncycles = 2 + +grompp.DEFAULTS['-f'] = mdp +grompp.DEFAULTS['-p'] = topol +grompp.DEFAULTS['-n'] = 'index.ndx' +grompp.DEFAULTS['-maxwarn'] = '4' +lsdmap.DEFAULTS[0] = 'mpirun -n 2 lsdmap' +lsdmap.DEFAULTS['-f'] = lsdmap_config +lsdmap.DEFAULTS['-s'] = atom_selection + +startfiles = [start,] * nreps +wfile = None + +for cycle in range(ncycles): + ginps = [] + for i in range(nreps): + ginp = grompp.new_inputs() + ginp['-c'] = startfiles[i] + ginps.append(ginp) + + b = db.from_sequence(ginps).map(grompp.run) + print 'Starting grompp runs...' + gouts = b.compute() + + minps = [] + for i in range(nreps): + minp = mdrun.new_inputs() + minp['-s'] = gouts[i]['-o'] + minps.append(minp) + + b = db.from_sequence(minps).map(mdrun.run) + print 'Starting MD jobs...' + mouts = b.compute() + + crdfiles = [mout['-c'] for mout in mouts] + crdlist = pack.pack(crdfiles) + + print 'Running LSDMap...' + linp = lsdmap.new_inputs() + linp['-c'] = crdfiles + linp['-t'] = start + if wfile is not None: + linp['-w'] = wfile + + lout = lsdmap.run(linp) + + shutil.copy(lout['-ev'], './results/iter{}.ev'.format(cycle)) + + print 'Running selection...' + sinp = selection.new_inputs() + sinp['-s'] = lout['-ev'] + sinp[1] = nreps + + sout = selection.run(sinp) + + print 'Running reweighting...' + rinp = reweighting.new_inputs() + rinp['-c'] = crdlist + rinp['-n'] = lout['-n'] + rinp['-s'] = sout['-o'] + + rout = reweighting.run(rinp) + + startfiles = pack.unpack(rout['-o']) + wfile = rout['-w'] diff --git a/examples/dmdmd/topol.top b/examples/dmdmd/topol.top index e10abd9..4375306 100644 --- a/examples/dmdmd/topol.top +++ b/examples/dmdmd/topol.top @@ -8,6 +8,7 @@ ; Generated by trjconv : Protein in water t= 0.00000 ; ; Include forcefield parameters +#include "oplsaa.ff/forcefield.itp" #include "ffG43a1.itp" ; Include chain topologies @@ -15,7 +16,7 @@ #include "topol_B.itp" ; Include water topology -#include "spc.itp" +#include "oplsaa.ff/spc.itp" #ifdef POSRES_WATER ; Position restraint for each water oxygen @@ -25,7 +26,7 @@ #endif ; Include generic topology for ions -#include "ions.itp" +#include "oplsaa.ff/ions.itp" [ system ] ; Name diff --git a/examples/dmdmd_ala12/README b/examples/dmdmd_ala12/README new file mode 100644 index 0000000..0a7f9f0 --- /dev/null +++ b/examples/dmdmd_ala12/README @@ -0,0 +1,7 @@ +Example DMDMD run on alanine12. Five cycles, 50 replicas per cycle. + +To run: + +setenv GMX_MAXBACKUP -1 +python rundmdmd.py + diff --git a/examples/dmdmd_ala12/grompp.mdp b/examples/dmdmd_ala12/grompp.mdp new file mode 100644 index 0000000..7b1e116 --- /dev/null +++ b/examples/dmdmd_ala12/grompp.mdp @@ -0,0 +1,59 @@ +; Input file +; integrator +integrator = sd +nsteps = 500 +dt = 0.002 +; +; removing CM translation and rotation +comm_mode = Angular +nstcomm = 1000 +; +; output control +nstlog = 0 +nstenergy = 0 +nstxout = 0 +nstvout = 0 +nstfout = 0 +; group definition +nstxtcout = 0 +xtc-precision = 0 +xtc-grps = protein +; +; neighbour searching +cutoff-scheme = group +nstlist = 0 +ns_type = grid +pbc = no +rlist = 20.0 +; +; electrostatic +rcoulomb = 20.0 +coulombtype = Cut-off +; +; vdw +vdw-type = Cut-off +rvdw = 20.0 +; +; constraints +constraints = all-bonds +constraint-algorithm = lincs +lincs_iter = 1 +lincs_order = 4 +; +; temperature +Tcoupl = +tc_grps = system +tau_t = 2 +ref_t = 300 +; +; pression +; +; initial velocities +gen_vel = yes +gen_temp = 300 +gen_seed = -1 + +ld-seed = -1 + +implicit_solvent = no + diff --git a/examples/dmdmd_ala12/lsdmap.ini b/examples/dmdmd_ala12/lsdmap.ini new file mode 100755 index 0000000..621cb6a --- /dev/null +++ b/examples/dmdmd_ala12/lsdmap.ini @@ -0,0 +1,17 @@ +[LSDMAP] +;metric used to compute the distance matrix (rmsd, cmd, dihedral, tica2) +metric=rmsd + +;constant r0 used with cmd metric +r0=0.05 + +[LOCALSCALE] +;status (constant, kneighbor, kneighbor_mean, user) +status=kneighbor_mean + +;constant epsilon used in case status is constant +epsilon=0.05 + +;value of k in case status is kneighbor or kneighbor_mean +k=100 + diff --git a/examples/dmdmd_ala12/mdout.mdp b/examples/dmdmd_ala12/mdout.mdp new file mode 100644 index 0000000..bbb5422 --- /dev/null +++ b/examples/dmdmd_ala12/mdout.mdp @@ -0,0 +1,355 @@ +; +; File 'mdout.mdp' was generated +; By user: charlie (1123) +; On host: tirith.pharm.nottingham.ac.uk +; At date: Thu Jan 28 14:13:11 2016 + +; + +; VARIOUS PREPROCESSING OPTIONS +; Preprocessor information: use cpp syntax. +; e.g.: -I/home/joe/doe -I/home/mary/roe +include = +; e.g.: -DPOSRES -DFLEXIBLE (note these variable names are case sensitive) +define = + +; RUN CONTROL PARAMETERS +integrator = sd +; Start time and timestep in ps +tinit = 0 +dt = 0.002 +nsteps = 500 +; For exact run continuation or redoing part of a run +init-step = 0 +; Part index is updated automatically on checkpointing (keeps files separate) +simulation-part = 1 +; mode for center of mass motion removal +comm_mode = Angular +; number of steps for center of mass motion removal +nstcomm = 1000 +; group(s) for center of mass motion removal +comm-grps = + +; LANGEVIN DYNAMICS OPTIONS +; Friction coefficient (amu/ps) and random seed +bd-fric = 0 +ld-seed = -1 + +; ENERGY MINIMIZATION OPTIONS +; Force tolerance and initial step-size +emtol = 10 +emstep = 0.01 +; Max number of iterations in relax-shells +niter = 20 +; Step size (ps^2) for minimization of flexible constraints +fcstep = 0 +; Frequency of steepest descents steps when doing CG +nstcgsteep = 1000 +nbfgscorr = 10 + +; TEST PARTICLE INSERTION OPTIONS +rtpi = 0.05 + +; OUTPUT CONTROL OPTIONS +; Output frequency for coords (x), velocities (v) and forces (f) +nstxout = 0 +nstvout = 0 +nstfout = 0 +; Output frequency for energies to log file and energy file +nstlog = 0 +nstcalcenergy = 100 +nstenergy = 0 +; Output frequency and precision for .xtc file +nstxout-compressed = 0 +compressed-x-precision = 0 +; This selects the subset of atoms for the compressed +; trajectory file. You can select multiple groups. By +; default, all atoms will be written. +compressed-x-grps = protein +; Selection of energy groups +energygrps = + +; NEIGHBORSEARCHING PARAMETERS +; cut-off scheme (Verlet: particle based cut-offs, group: using charge groups) +cutoff-scheme = group +; nblist update frequency +nstlist = 0 +; ns algorithm (simple or grid) +ns_type = grid +; Periodic boundary conditions: xyz, no, xy +pbc = no +periodic-molecules = no +; Allowed energy error due to the Verlet buffer in kJ/mol/ps per atom, +; a value of -1 means: use rlist +verlet-buffer-tolerance = 0.005 +; nblist cut-off +rlist = 20.0 +; long-range cut-off for switched potentials +rlistlong = -1 +nstcalclr = -1 + +; OPTIONS FOR ELECTROSTATICS AND VDW +; Method for doing electrostatics +coulombtype = Cut-off +coulomb-modifier = Potential-shift-Verlet +rcoulomb-switch = 0 +rcoulomb = 20.0 +; Relative dielectric constant for the medium and the reaction field +epsilon-r = 1 +epsilon-rf = 0 +; Method for doing Van der Waals +vdw-type = Cut-off +vdw-modifier = Potential-shift-Verlet +; cut-off lengths +rvdw-switch = 0 +rvdw = 20.0 +; Apply long range dispersion corrections for Energy and Pressure +DispCorr = No +; Extension of the potential lookup tables beyond the cut-off +table-extension = 1 +; Separate tables between energy group pairs +energygrp-table = +; Spacing for the PME/PPPM FFT grid +fourierspacing = 0.12 +; FFT grid size, when a value is 0 fourierspacing will be used +fourier-nx = 0 +fourier-ny = 0 +fourier-nz = 0 +; EWALD/PME/PPPM parameters +pme-order = 4 +ewald-rtol = 1e-05 +ewald-rtol-lj = 0.001 +lj-pme-comb-rule = Geometric +ewald-geometry = 3d +epsilon-surface = 0 + +; IMPLICIT SOLVENT ALGORITHM +implicit_solvent = no + +; GENERALIZED BORN ELECTROSTATICS +; Algorithm for calculating Born radii +gb-algorithm = Still +; Frequency of calculating the Born radii inside rlist +nstgbradii = 1 +; Cutoff for Born radii calculation; the contribution from atoms +; between rlist and rgbradii is updated every nstlist steps +rgbradii = 1 +; Dielectric coefficient of the implicit solvent +gb-epsilon-solvent = 80 +; Salt concentration in M for Generalized Born models +gb-saltconc = 0 +; Scaling factors used in the OBC GB model. Default values are OBC(II) +gb-obc-alpha = 1 +gb-obc-beta = 0.8 +gb-obc-gamma = 4.85 +gb-dielectric-offset = 0.009 +sa-algorithm = Ace-approximation +; Surface tension (kJ/mol/nm^2) for the SA (nonpolar surface) part of GBSA +; The value -1 will set default value for Still/HCT/OBC GB-models. +sa-surface-tension = -1 + +; OPTIONS FOR WEAK COUPLING ALGORITHMS +; Temperature coupling +tcoupl = No +nsttcouple = -1 +nh-chain-length = 10 +print-nose-hoover-chain-variables = no +; Groups to couple separately +tc_grps = system +; Time constant (ps) and reference temperature (K) +tau_t = 2 +ref_t = 300 +; pressure coupling +pcoupl = No +pcoupltype = Isotropic +nstpcouple = -1 +; Time constant (ps), compressibility (1/bar) and reference P (bar) +tau-p = 1 +compressibility = +ref-p = +; Scaling of reference coordinates, No, All or COM +refcoord-scaling = No + +; OPTIONS FOR QMMM calculations +QMMM = no +; Groups treated Quantum Mechanically +QMMM-grps = +; QM method +QMmethod = +; QMMM scheme +QMMMscheme = normal +; QM basisset +QMbasis = +; QM charge +QMcharge = +; QM multiplicity +QMmult = +; Surface Hopping +SH = +; CAS space options +CASorbitals = +CASelectrons = +SAon = +SAoff = +SAsteps = +; Scale factor for MM charges +MMChargeScaleFactor = 1 +; Optimization of QM subsystem +bOPT = +bTS = + +; SIMULATED ANNEALING +; Type of annealing for each temperature group (no/single/periodic) +annealing = +; Number of time points to use for specifying annealing in each group +annealing-npoints = +; List of times at the annealing points for each group +annealing-time = +; Temp. at each annealing point, for each group. +annealing-temp = + +; GENERATE VELOCITIES FOR STARTUP RUN +gen_vel = yes +gen_temp = 300 +gen_seed = -1 + +; OPTIONS FOR BONDS +constraints = all-bonds +; Type of constraint algorithm +constraint-algorithm = lincs +; Do not constrain the start configuration +continuation = no +; Use successive overrelaxation to reduce the number of shake iterations +Shake-SOR = no +; Relative tolerance of shake +shake-tol = 0.0001 +; Highest order in the expansion of the constraint coupling matrix +lincs_order = 4 +; Number of iterations in the final step of LINCS. 1 is fine for +; normal simulations, but use 2 to conserve energy in NVE runs. +; For energy minimization with constraints it should be 4 to 8. +lincs_iter = 1 +; Lincs will write a warning to the stderr if in one step a bond +; rotates over more degrees than +lincs-warnangle = 30 +; Convert harmonic bonds to morse potentials +morse = no + +; ENERGY GROUP EXCLUSIONS +; Pairs of energy groups for which all non-bonded interactions are excluded +energygrp-excl = + +; WALLS +; Number of walls, type, atom types, densities and box-z scale factor for Ewald +nwall = 0 +wall-type = 9-3 +wall-r-linpot = -1 +wall-atomtype = +wall-density = +wall-ewald-zfac = 3 + +; COM PULLING +pull = no + +; ENFORCED ROTATION +; Enforced rotation: No or Yes +rotation = no + +; Group to display and/or manipulate in interactive MD session +IMD-group = + +; NMR refinement stuff +; Distance restraints type: No, Simple or Ensemble +disre = No +; Force weighting of pairs in one distance restraint: Conservative or Equal +disre-weighting = Conservative +; Use sqrt of the time averaged times the instantaneous violation +disre-mixed = no +disre-fc = 1000 +disre-tau = 0 +; Output frequency for pair distances to energy file +nstdisreout = 100 +; Orientation restraints: No or Yes +orire = no +; Orientation restraints force constant and tau for time averaging +orire-fc = 0 +orire-tau = 0 +orire-fitgrp = +; Output frequency for trace(SD) and S to energy file +nstorireout = 100 + +; Free energy variables +free-energy = no +couple-moltype = +couple-lambda0 = vdw-q +couple-lambda1 = vdw-q +couple-intramol = no +init-lambda = -1 +init-lambda-state = -1 +delta-lambda = 0 +nstdhdl = 50 +fep-lambdas = +mass-lambdas = +coul-lambdas = +vdw-lambdas = +bonded-lambdas = +restraint-lambdas = +temperature-lambdas = +calc-lambda-neighbors = 1 +init-lambda-weights = +dhdl-print-energy = no +sc-alpha = 0 +sc-power = 1 +sc-r-power = 6 +sc-sigma = 0.3 +sc-coul = no +separate-dhdl-file = yes +dhdl-derivatives = yes +dh_hist_size = 0 +dh_hist_spacing = 0.1 + +; Non-equilibrium MD stuff +acc-grps = +accelerate = +freezegrps = +freezedim = +cos-acceleration = 0 +deform = + +; simulated tempering variables +simulated-tempering = no +simulated-tempering-scaling = geometric +sim-temp-low = 300 +sim-temp-high = 300 + +; Electric fields +; Format is number of terms (int) and for all terms an amplitude (real) +; and a phase angle (real) +E-x = +; Time dependent (pulsed) electric field. Format is omega, time for pulse +; peak, and sigma (width) for pulse. Sigma = 0 removes pulse, leaving +; the field to be a cosine function. +E-xt = +E-y = +E-yt = +E-z = +E-zt = + +; Ion/water position swapping for computational electrophysiology setups +; Swap positions along direction: no, X, Y, Z +swapcoords = no + +; AdResS parameters +adress = no + +; User defined thingies +user1-grps = +user2-grps = +userint1 = 0 +userint2 = 0 +userint3 = 0 +userint4 = 0 +userreal1 = 0 +userreal2 = 0 +userreal3 = 0 +userreal4 = 0 diff --git a/examples/dmdmd_ala12/results/iter0.ev b/examples/dmdmd_ala12/results/iter0.ev new file mode 100644 index 0000000..4ebc1b9 --- /dev/null +++ b/examples/dmdmd_ala12/results/iter0.ev @@ -0,0 +1,50 @@ +1.414213562373095590e-01 -3.962598985279339181e-02 1.364567277645529868e-02 -4.836067269044934391e-02 -2.235281355383886281e-01 1.088230161009204472e-01 3.888108552599279372e-02 3.675471659736070928e-02 -5.719151696589620110e-02 2.978846214433225614e-01 +1.414213562373095590e-01 -1.603667242410596050e-01 1.497970685187025031e-01 -1.057185897733216445e-01 1.671412671046556275e-01 3.193348976838006337e-02 -8.039711212441863486e-02 -1.506218661988655352e-02 1.705425265821502723e-01 9.046807652847739523e-02 +1.414213562373093924e-01 6.312754033894577010e-02 7.555857881990576952e-02 -1.864742689233151174e-01 -4.875566226634081742e-03 7.422321700103544362e-02 6.232872791699604897e-02 3.205779863195888646e-02 -9.761682679728038436e-02 -5.440836211998180405e-02 +1.414213562373094202e-01 1.232268753048944288e-02 9.207011076089971491e-02 -1.133007352764062725e-01 -5.601882878941234073e-02 -3.730553891339377648e-01 -1.607321522658111679e-02 -5.267031336864737984e-02 8.498054112415995287e-02 2.574306031371699777e-01 +1.414213562373095034e-01 -7.834537222683232716e-02 8.776978653582553913e-03 -9.365200267640483300e-02 -1.502151390080654347e-01 1.926289457760489154e-01 1.165577075433392867e-01 -7.322143928276159119e-02 9.795412061126200498e-02 -5.110685052295693004e-02 +1.414213562373094757e-01 2.538562807758332207e-01 9.795218261230097256e-02 1.128110019342936643e-01 5.338954568954517969e-03 2.873790695209869558e-02 -1.804435374422005967e-01 1.152713996087126047e-01 6.144535659028306507e-02 -7.090345198068329080e-02 +1.414213562373095590e-01 9.090614015351397570e-02 8.459944811910978177e-03 -1.700301826650047476e-01 -9.492307765611342207e-02 -7.546108382542260351e-02 -1.367183743771409887e-01 1.232554405834314776e-01 1.147302527899001778e-01 1.178651510504799202e-03 +1.414213562373095312e-01 3.107969256545015796e-02 -1.145132610870829154e-01 -1.691325906409005611e-02 1.004472770852335856e-01 1.878765256412563700e-02 8.770828147359734095e-02 -1.743624419604069831e-01 -2.656407093404708486e-01 -2.094714798498898897e-02 +1.414213562373095034e-01 -1.250185841834247080e-01 9.895358801123016815e-03 3.230186216844657676e-01 -1.443424788938233172e-01 6.739751440786803660e-02 -2.927308598072040149e-02 1.657374822669977973e-02 -2.389364621152120505e-01 -3.640308097054820863e-02 +1.414213562373095312e-01 -1.401586077365098437e-01 2.410054077369350872e-02 5.130631048900809871e-02 1.075509558188339071e-01 1.353129699525210394e-01 -8.594177315614105750e-02 -1.124971357137113798e-01 6.633979389511554872e-03 3.590644263308563622e-02 +1.414213562373095034e-01 6.614967436598775952e-02 -7.188940716817024401e-02 -7.442631750179620753e-02 -3.477795528169715100e-02 -2.186987152629054493e-02 -1.036245215502600014e-01 4.981096914094181732e-02 1.956597952723354572e-02 -7.580563383613965478e-02 +1.414213562373094757e-01 -1.562288735784173599e-01 5.279592931185716348e-02 5.046140348954403221e-01 -2.542748850418745724e-02 -2.022622123900313096e-01 7.226796122701857096e-03 4.180811509540031945e-02 -2.117765282418350992e-01 -3.817551181523801129e-01 +1.414213562373095312e-01 -6.483876016446754598e-02 6.950871239564909709e-02 1.480798262679666466e-01 -2.260172673450794589e-01 4.102068304006949856e-02 5.409377621432512329e-02 1.109862404939187391e-01 -3.563216312224606191e-02 -5.829043648237368369e-02 +1.414213562373094757e-01 -1.190338949126660585e-02 -1.380483742112645074e-01 4.148126451809356491e-02 -9.022341908797067156e-02 3.358674814608509501e-02 -4.124629969053310308e-02 8.881238317832448881e-02 7.585778600466060173e-02 -6.523957471389314755e-02 +1.414213562373094757e-01 -7.288456028621233262e-02 3.623576544354287221e-03 -1.347572382038084715e-01 1.297630608670223389e-02 7.515402120564093624e-02 9.626760758528685180e-02 5.156181806997961470e-01 -6.648252005906141182e-02 -3.802159782687494771e-02 +1.414213562373094757e-01 8.782452475262566768e-03 -4.083328454547308756e-05 -5.143295256376063246e-02 8.124852446104259551e-02 3.462878907201468858e-03 -7.846438979497710742e-02 4.541736318381848353e-02 -2.033179779860792569e-01 -2.543118151729789958e-02 +1.414213562373093647e-01 1.446729956657328009e-01 -1.251104447376331363e-01 -1.805531081406372071e-02 1.509925170304025066e-01 -1.014714604233125234e-01 -1.646710138337901252e-01 6.040870445500735528e-03 -1.622879530954058139e-02 -8.749992984424411618e-03 +1.414213562373095312e-01 -8.747879032758838769e-02 -7.856560419532865325e-03 -1.237890706123329632e-01 8.174716675263392351e-02 1.767405461639123543e-01 -2.844869715281228909e-02 1.904850760587760081e-02 2.466630872873847372e-02 -1.171757993104112217e-01 +1.414213562373095034e-01 1.138850244189384409e-01 -1.040520803586321569e-01 2.964954987614535145e-02 1.495873016794404577e-02 -9.309063963351586757e-02 3.083155269059766057e-02 1.349641562972140885e-01 -3.012461054125096377e-02 2.869220300454221849e-03 +1.414213562373096145e-01 5.195151499793311187e-03 -2.997985553012517124e-01 8.084458962977034147e-02 -7.408565353147641974e-02 -4.072434831268650357e-01 3.380128451714026205e-02 -4.852617801365909089e-02 8.189472273522925561e-02 -7.990671948330409224e-02 +1.414213562373095312e-01 3.536045443927431364e-01 5.096415046584833464e-01 1.501690609570783819e-01 -1.824195057294028810e-01 9.772416901903712219e-03 -4.023253878200035993e-01 -1.495532591598172645e-01 1.633382736022931381e-01 -1.627259867591555609e-01 +1.414213562373095312e-01 -1.331714901418361297e-01 -8.180436566213253324e-02 -2.756106716812434590e-02 6.282082412226019409e-03 -4.996159899379437608e-02 -1.754760232615326307e-02 -1.986619127854911682e-01 1.686962928914393089e-01 -2.564341718323511765e-01 +1.414213562373094202e-01 6.623016957417519890e-02 5.257832813803072630e-02 -2.021607573499005495e-01 7.608700637476728534e-02 1.764843118497865793e-01 7.055729574835956086e-02 -2.229504820169729007e-01 -1.809683451947978750e-01 -1.847697969187922784e-01 +1.414213562373096145e-01 -1.558739719727209871e-01 -1.373051998633261772e-01 -8.031926602785403879e-02 -5.049816425178797058e-02 -7.178034324389273579e-02 8.969698900700365241e-02 -3.260445701132697605e-01 1.882964529005914101e-01 -2.398688247578051325e-01 +1.414213562373093924e-01 -1.162165879490373588e-01 -4.364338981882004420e-02 -3.245440773188045663e-02 -1.703023237866342632e-02 1.418621366411286500e-01 -8.119417666913114617e-02 -7.308207894402024563e-02 4.409530614262546777e-02 5.240661780345927390e-02 +1.414213562373095312e-01 -2.312186876760016080e-02 9.459374327544704808e-02 -2.042789786541622798e-01 1.089777661400834902e-01 -1.879146120100863571e-01 2.001135383449353378e-01 -4.167202082408428231e-03 -1.361883849537560143e-01 -5.163199762929580189e-02 +1.414213562373094479e-01 -9.608732987555865246e-03 3.333469930912189710e-02 -6.054650687509261636e-02 -2.596516944873581423e-01 1.190748379298551957e-01 1.779746080734056213e-01 -4.964863813903962197e-02 9.775526486376764912e-02 -2.015088664665899698e-02 +1.414213562373094757e-01 1.532417468192339045e-02 -5.061267160135739240e-02 4.780407926527027729e-02 -1.751219190366420375e-01 -4.130566226047856226e-02 -5.559790927200452398e-02 -9.741144570262989799e-02 -1.466533554186482957e-01 3.481202032154642190e-01 +1.414213562373094757e-01 4.007978072330795755e-02 -7.257213345415995664e-02 -1.215483388106891049e-01 -3.932088936995448147e-02 -2.322068881444077845e-02 -6.243748479878875879e-02 5.945885259229580222e-02 1.455585967609892839e-01 -1.395851121543341955e-01 +1.414213562373095034e-01 -2.632612817120071336e-01 1.295065336561164182e-01 1.799102278671321498e-01 1.350174987898259682e-01 1.451444076232408231e-01 -5.811671089071901442e-02 -1.068433170923875353e-01 1.161977139516212759e-01 6.381656008342463660e-02 +1.414213562373095034e-01 -5.316313758757994917e-02 -1.921642633485555196e-01 2.764844388682883083e-02 4.922279369660246401e-02 -1.519280170781906261e-02 -1.452976917422259817e-01 -5.784234717016791677e-02 5.493421857597154123e-02 1.342270127916127820e-01 +1.414213562373095867e-01 -2.225342704122748247e-02 1.484953944004889503e-01 -1.920856820828928391e-01 1.657329042289813412e-02 -1.591802976795458902e-01 -3.302494121273682071e-03 2.850533953757263261e-01 1.245203054049058011e-01 -1.938372702606072917e-01 +1.414213562373094202e-01 -2.516194241370883766e-01 1.156655408561766823e-01 8.493936339959924642e-02 1.896440061506554642e-01 2.108247497160951056e-01 -1.061499984221642712e-01 1.045147407789244892e-01 1.383933145672690268e-01 9.271787482476777364e-03 +1.414213562373095312e-01 1.359716943716715865e-01 -1.171225408663636169e-01 -3.957737659739384711e-02 2.445484673644253149e-01 -3.052046449443359885e-02 -9.106167391061804894e-02 9.309818738845465624e-02 -6.939303369821980816e-02 -7.790415045916937453e-02 +1.414213562373094202e-01 -1.500671055757956361e-02 1.678671288771673986e-01 -1.381632061335926753e-01 -8.695550610470878516e-03 -4.774045411894566396e-03 1.535147349920494564e-01 2.193158978459961161e-01 -2.015266795150351953e-01 2.931937961819873137e-02 +1.414213562373095034e-01 -3.424390371712947301e-02 1.061527795128523188e-01 1.554053497851861643e-01 -2.525132266226389199e-01 -4.377922521824496177e-02 3.601675724360318270e-02 4.954045961851279156e-02 -1.465313229501173098e-01 2.738499634935040797e-02 +1.414213562373095034e-01 1.501480381526160701e-01 2.914023766383084038e-02 -2.084550270324518270e-02 1.480123040953242874e-01 -1.484375839711178091e-01 -1.151867065417993552e-01 2.793236368515352938e-02 -1.426812431911224921e-01 4.098334845587973951e-02 +1.414213562373095312e-01 3.342604371157960608e-01 2.297098185483132382e-01 -2.908347129427500330e-02 1.976312993826580544e-01 1.341818183101992912e-01 7.049078201896316620e-02 -2.860274731179586194e-01 -1.754911243695584100e-01 1.084748127105212012e-01 +1.414213562373095312e-01 3.026575238131543055e-01 -1.202443058093561334e-01 3.205186765178889563e-01 3.026676899843613877e-01 1.747668621089011332e-01 4.832189637719515596e-01 7.917664853987413376e-02 2.679975340188279764e-01 3.142984327080194235e-02 +1.414213562373094479e-01 -5.904850284643003988e-02 -6.928424142954338338e-02 -2.304951849742361766e-02 1.131367162231387141e-01 2.733552252419295739e-02 -9.584298069846962365e-02 5.322640310532693835e-05 -7.426243461886854191e-02 7.022678329001455499e-03 +1.414213562373096145e-01 2.960864259228791484e-01 -9.114626161021754935e-02 2.194914664968226903e-01 -2.238738092951148353e-02 7.405735465849937194e-02 1.612469520890673358e-01 1.016369126968083708e-01 3.342275833166536980e-01 1.358514317844690400e-01 +1.414213562373096145e-01 -1.049109807935626887e-01 -1.347268242638964553e-01 -1.303369578676231468e-02 8.755652600996162438e-02 4.536446029557160420e-02 -1.178277037880792882e-01 8.492248973703682771e-03 9.802384007368321328e-02 1.085730004210204019e-01 +1.414213562373094202e-01 3.472706950081214106e-02 8.555388665092736322e-02 -5.797675974853978148e-02 -3.073817856905567969e-01 -1.395814342447827539e-01 2.699075228676930394e-01 -1.574468627541582011e-01 5.573467094872219807e-02 1.387635440120447983e-01 +1.414213562373096145e-01 -6.845349640031785088e-02 -1.529238613236748312e-01 3.749399582027135303e-02 -3.388021565888481301e-02 -5.608743555481139620e-02 -2.537172161570452333e-01 9.892667451183222160e-02 1.040949500280971135e-01 2.458172057873592997e-01 +1.414213562373095034e-01 -2.688237631339875922e-01 3.872640965032913551e-01 8.127824241369698000e-02 3.166579099050406687e-01 -3.546218870044356986e-01 2.276212630736579590e-01 -6.646181948747785506e-02 1.221502953747895803e-01 1.996246377626857693e-01 +1.414213562373094757e-01 1.199485322285909483e-01 -1.669576025711669576e-01 3.447321024262543082e-03 9.841114254123256924e-03 -1.057584004775103705e-02 -2.815348080660802152e-02 -9.446221949082539426e-02 -1.064901462788695186e-01 8.337551584248795167e-02 +1.414213562373093924e-01 -5.066062463825696249e-02 -8.224232969654471370e-02 -2.100232620972468725e-02 -3.227408783338827497e-02 1.981375820789368636e-01 -7.615805684869884906e-02 -1.046432504973455052e-01 -1.145008862729883677e-02 1.363709392054605340e-01 +1.414213562373094202e-01 3.033686013701956258e-02 -3.529595722092856991e-02 -1.672129602424082262e-01 -1.630678289656663504e-01 5.193689973774954366e-02 1.085720267444574977e-01 -6.634567133697873154e-02 1.049987030602798355e-01 -2.238631422185485831e-01 +1.414213562373093924e-01 3.355068335334866758e-02 -1.591490456343286342e-01 2.814848950862003374e-02 7.768846811414963083e-02 -7.307222207335224706e-02 1.356686534008317430e-02 -1.116961027301210663e-01 -2.288521398717333899e-01 -2.099388335114990914e-02 +1.414213562373095312e-01 -7.030735480098528056e-02 -4.527758881315260137e-03 6.211374587036288392e-02 -6.782029894176180851e-02 1.742155685126073605e-01 9.174811311597212693e-02 1.557477974362052875e-01 -1.498528333949331603e-01 5.942212931475888277e-02 diff --git a/examples/dmdmd_ala12/results/iter1.ev b/examples/dmdmd_ala12/results/iter1.ev new file mode 100644 index 0000000..afa037c --- /dev/null +++ b/examples/dmdmd_ala12/results/iter1.ev @@ -0,0 +1,50 @@ +1.414213562373094757e-01 5.471768911421195231e-02 2.044186276167613281e-01 1.795422493960147081e-02 -4.667784322256540719e-02 -1.764333816234959357e-02 7.472243377452460200e-02 -2.310310910770234372e-01 -2.230589596092907023e-01 1.266520810480070425e-01 +1.414213562373095590e-01 -4.771658344893682513e-02 1.275812814293980635e-01 1.627673409626376466e-01 3.426389221680708336e-02 5.945936771396630183e-02 -5.612188094060208132e-02 -1.355503080751398748e-01 -8.762763843545787190e-02 -9.393783278035824913e-02 +1.414213562373094202e-01 3.894523079617730893e-02 2.381172959950593471e-01 -7.552911704604055310e-02 3.589541002261884689e-02 -2.807381398091396071e-03 4.059921071730540620e-02 -2.239827978872195868e-01 -2.002863072442019610e-01 1.892524345484090653e-01 +1.414213562373095034e-01 -2.427687117034989794e-01 -1.577319609249219490e-01 -1.753081479758750449e-01 -2.526569622315851804e-01 1.998634676475887773e-01 2.163900296355776853e-01 -2.870344689064188715e-01 -6.260347905879021409e-03 1.881691606798641669e-01 +1.414213562373093092e-01 -2.212092630470747778e-01 8.572684925120439142e-03 -1.774079112177562312e-01 -1.404321315458952578e-02 -8.834558747505349974e-02 2.296842174119038266e-02 1.359337872353651167e-01 -1.586666158385049985e-02 -2.844135696259852270e-02 +1.414213562373094757e-01 -2.374701446037376651e-01 -1.501634048847685747e-02 6.420607604305562932e-02 -1.047544613780986844e-01 -2.131287307013606247e-01 -1.717278786817463647e-03 1.540888872424177047e-01 9.041977038743936879e-02 2.911450936113273266e-04 +1.414213562373094479e-01 -1.995585675923747804e-01 -3.204906048411865216e-02 -1.110127928057409175e-01 -2.527173285804881243e-03 -2.135695371263360634e-02 -1.516735749080515838e-01 -4.552446642791660447e-02 3.410302542231997969e-02 -1.549499221104787827e-01 +1.414213562373094202e-01 -1.846737206171192858e-01 -9.345525467074554393e-02 4.878562762834704608e-02 -2.456843262114607324e-02 -9.476133250708837497e-02 -1.664528624630365883e-01 -1.446026451963653148e-01 1.339842408550361297e-01 2.227358744892490167e-02 +1.414213562373096145e-01 -2.284663504301707171e-01 -2.976182354965540081e-02 -8.015212473119906478e-02 3.960778163696112436e-02 -1.513560879027573136e-01 -8.983432684802729676e-03 -5.535914811000106073e-02 -1.019756598368439932e-01 -1.209888365673204569e-01 +1.414213562373095867e-01 -2.397248179429775639e-01 -2.958007160019070908e-02 -1.072307531667691244e-01 6.604913297562467478e-02 -1.548712029610012642e-01 -1.112013749243944208e-02 1.360475033962597891e-01 -1.499421599319140652e-01 -1.791553664819980950e-03 +1.414213562373095312e-01 -3.011542334606982507e-01 -1.426785271232528518e-01 -1.765409856712534531e-01 -2.095321592333465946e-02 -2.703060160204882600e-01 1.955544101774777110e-01 6.953388658960278634e-02 -1.667967033785411612e-01 2.756795985346772657e-02 +1.414213562373095034e-01 -2.184480471565608817e-01 -1.342738784050884759e-01 -1.203771847555729219e-01 -1.495070918688016504e-01 1.037460710965310007e-01 2.281055533656783374e-01 -2.934978345716376391e-01 6.366088350638655913e-02 -1.784990971486969391e-01 +1.414213562373095867e-01 -2.463598103545855678e-01 -8.623274498637796548e-02 -1.925162493552035614e-01 5.211653415974799863e-02 -7.562678692635638189e-02 9.555454463718701663e-02 1.944462046422503476e-01 -3.012871604541097342e-02 9.275409099728472440e-02 +1.414213562373095867e-01 -2.354613164630005029e-01 -4.698993307119625484e-02 -4.035378449563106068e-02 -9.395508448029644966e-02 -4.129119642087848707e-02 -2.310563325357033737e-01 9.787468858985723386e-02 -8.876093224489207956e-02 8.944541924368672181e-02 +1.414213562373095034e-01 -2.410334152706175570e-01 1.801202323693606652e-03 -5.059832883543587817e-02 -6.268406377892522807e-02 -1.787376124862310456e-01 -1.677163347387242431e-01 4.974110948820213707e-02 -5.607744397154328098e-02 6.679787104415557675e-02 +1.414213562373096422e-01 -2.569101358838566385e-01 -2.634436721728625197e-02 -1.038725110984324851e-01 -1.575075010983696330e-02 -2.380137810817505306e-01 -3.126825045186062274e-02 -4.648059937499031402e-02 -2.225501387341391815e-02 2.606851438962062839e-02 +1.414213562373095590e-01 -1.628656703489180235e-01 -3.508703549562575824e-02 -1.089661352485754749e-02 3.047226122163237960e-02 -5.634174134955829971e-02 -2.289068229344065272e-02 -1.144465072702171710e-01 -4.231373087134154831e-02 -1.958640853650958913e-01 +1.414213562373094757e-01 1.662569420803937381e-01 1.325839687245503398e-02 -1.269065493236965214e-01 5.776709553954343518e-02 -2.683700470330588894e-01 2.290325575565865246e-01 2.107719567938428906e-01 1.851939185581057412e-01 -1.131147195678906293e-02 +1.414213562373094757e-01 -8.596830691506856734e-03 3.924748739790641650e-01 -4.085159419303575207e-02 -8.334881880976970081e-02 -1.843786198407449672e-01 -1.385900870978973576e-01 9.224877066580948470e-02 -1.053862880589896169e-02 1.663045933242160990e-01 +1.414213562373095034e-01 5.645647833856193981e-02 1.196023947937553122e-01 -7.263202574707512682e-02 2.316549815437836390e-02 1.187923292526507774e-01 -1.014814507001410571e-01 -6.001528695439419664e-02 -1.954430765409806980e-01 9.808675695815931295e-02 +1.414213562373095312e-01 1.151103827298266824e-01 -2.549596813684185670e-01 -1.410918366470973739e-01 -2.722026391884779101e-02 9.640482594160475205e-02 -3.191342444273780887e-01 7.027327458922813519e-02 -2.302447298524589944e-02 1.124842459220439378e-01 +1.414213562373095590e-01 -2.111573117929395251e-03 5.687937895048875842e-02 2.095631520065046050e-01 -2.481666025420929678e-02 8.679349325512748792e-02 -5.369805580267349859e-02 -5.098864494482835408e-02 -6.081667094097982507e-02 -8.352089660204517485e-02 +1.414213562373096145e-01 1.772622999942411945e-02 4.856338667877794363e-02 1.183556041932651709e-01 -6.773964189455355944e-02 6.281997375333105149e-02 -2.205839075829358342e-01 -8.217263297298361968e-02 -3.638910371662364834e-02 -2.415734914102037889e-01 +1.414213562373094757e-01 1.489019350965980204e-01 8.327105696706775181e-03 -2.171125340072139476e-01 3.451216932541438520e-02 -1.691535104368649123e-01 -1.180968497497834196e-01 -8.218664993164303059e-03 8.507232454474553118e-02 -1.586004182555205977e-01 +1.414213562373095312e-01 3.760340670745358077e-02 6.234716326235335837e-02 -6.002032780884529461e-02 -2.177562067700335446e-01 1.427156474402557496e-01 7.711066888875761638e-02 -3.344776905725272559e-02 2.767963182114827614e-01 1.271791994190382136e-01 +1.414213562373093924e-01 6.156924323359648510e-02 -1.687347516198103303e-01 1.999281798298449542e-01 4.920617660976644991e-02 -4.274722853305031045e-02 1.125383709293638484e-01 -1.271533407401873317e-01 1.223499605422910669e-01 1.435142820303053068e-01 +1.414213562373095034e-01 -5.233400843699913957e-02 -8.980500454101765506e-02 1.937825066341227753e-01 1.848757571788999638e-04 8.937795907497664283e-02 1.747333105714313495e-01 -3.215094010972788241e-02 1.990610410922433529e-02 -5.809896534233245646e-02 +1.414213562373095034e-01 2.754822119721234489e-02 4.167355054502461242e-02 1.283062377450555278e-02 -9.681895696183977218e-02 2.030467870854669177e-01 3.087872195651249485e-01 3.122938235177870336e-02 5.754940648755397549e-03 4.100266114446644850e-03 +1.414213562373095312e-01 2.651569898202194714e-02 1.521124387508985265e-01 2.712285417717720179e-02 -1.228355735988271580e-01 8.146309080460387153e-02 -4.546216009730170288e-02 7.577263963697496683e-03 -3.470874911100534921e-01 -1.379176926832950678e-01 +1.414213562373094479e-01 -1.733126753595848890e-01 -1.282734581127826234e-01 -1.979294536807518420e-02 3.228366877998217199e-01 9.205974418354416489e-02 -4.322273310472815600e-03 6.615891572765912609e-02 6.949312239730839891e-02 2.481988803521007203e-01 +1.414213562373095590e-01 -3.834580472281136354e-02 -1.777901559137989584e-01 2.422299059057086701e-01 5.922588022021892801e-02 1.343104653785079650e-01 2.290143312406923704e-01 7.845058851813009604e-02 1.209465825261263165e-02 -5.554560800515722513e-02 +1.414213562373094479e-01 3.660234781662612819e-02 2.405587080653748822e-01 -7.271745859037885562e-02 -3.999722242992036908e-02 -5.506769238342387740e-02 2.147652505647463517e-01 9.971184461886288888e-03 -3.781052942108578674e-03 1.762857009164438271e-01 +1.414213562373093924e-01 9.478379991977570196e-02 -6.943945025783486436e-02 -1.233563753646597788e-01 1.712160023203596615e-01 5.178416077838919607e-02 9.576365115012216989e-02 1.932579704432024759e-01 -4.747149864184649348e-02 -5.120697565931363326e-02 +1.414213562373096145e-01 9.838978217057756104e-02 -4.920179308483920572e-02 -1.155747176861160741e-01 2.707216081220543691e-01 -6.331768331558901286e-02 2.225744156757345216e-01 -1.298705786135996298e-01 -7.349073628722058160e-02 -1.202692494567398906e-01 +1.414213562373095312e-01 5.385866730595478130e-02 1.768754249146312074e-02 6.002496171671267700e-02 5.691137930342505397e-02 6.039840806544299195e-02 -2.024699230556695762e-01 1.387903495121280972e-01 -7.760932078203440498e-02 -4.600078378830814441e-02 +1.414213562373095312e-01 1.764327689556348666e-01 -4.900501990872877522e-01 8.439915811463290229e-02 -5.034934386861178446e-01 -2.070506403043357868e-01 -4.440022265182518024e-02 4.037269304628458150e-02 -2.951837176486686865e-01 3.523195920674073583e-02 +1.414213562373096422e-01 -2.382727955540098544e-02 3.191004838842707858e-02 -1.192198364769430918e-01 -1.664272482549505328e-01 2.441807220823963981e-02 -1.077886973699014456e-01 -2.619884205112504305e-01 4.580523638146409837e-01 -2.821389063540972741e-01 +1.414213562373093647e-01 2.415226148452827987e-02 1.836517473480316076e-01 8.281697566748676131e-02 -2.587197380043415595e-01 6.268004360791998297e-02 6.555803690050791832e-02 1.360634127807040794e-01 7.040679125452136734e-03 1.418904951177007434e-01 +1.414213562373094479e-01 1.518349415278536126e-02 7.095078024869178220e-03 1.478685683683996499e-01 5.507603699885698506e-02 1.740208631401285108e-02 -8.418613814144919327e-02 -3.888893496090044255e-02 1.497169373355268784e-01 5.832073119279876892e-03 +1.414213562373094479e-01 5.107132679151443755e-02 -1.842660103413091763e-02 1.394828668389679616e-01 2.071980320516396135e-01 -7.916723411979099956e-02 -8.987967094595401829e-02 -2.390114327665592564e-01 -6.064862856878479487e-03 5.889904128417330215e-02 +1.414213562373094757e-01 -5.679105363857552859e-03 -1.078453862389284063e-01 9.264626682775496669e-02 4.059359981619886648e-02 1.692989642771758896e-01 -4.347382630221990202e-02 -5.138969307130102082e-02 8.854372073839909818e-02 1.042444097700456207e-01 +1.414213562373096145e-01 -2.714122757561169066e-02 -4.216489387799406130e-02 -1.642664053081160577e-02 1.856977325032808657e-01 1.967090754301744071e-01 -1.009028948552466581e-01 3.007540991923591811e-01 -7.484896875410511873e-03 -9.008492241629358077e-02 +1.414213562373095312e-01 1.259250952856950101e-01 -5.944647222719040558e-02 -2.775906486439036480e-01 8.799099071918130288e-02 5.558166817516570907e-02 1.262275355175344893e-01 -3.505560516553893335e-02 -1.340975265004971384e-01 -9.055005978271049583e-02 +1.414213562373095312e-01 1.629247871221316604e-02 1.066837477505983706e-01 2.892981537719517895e-02 -3.035775094364143514e-02 8.189006637668008737e-02 -6.262586006059077393e-02 9.762125393259810102e-02 9.228489975270223744e-02 -1.447757884610700874e-01 +1.414213562373094202e-01 1.253668547874315919e-01 -1.344007696577197430e-01 2.178135366163148900e-01 5.083004385935478014e-02 -2.635221950135375746e-01 4.594925751808169589e-02 -2.601747549899483328e-02 1.230939886146334011e-01 1.245855055370557879e-01 +1.414213562373095312e-01 1.198154592347947106e-01 -9.346167356949544591e-02 -1.175123906101184640e-01 2.473791891179653590e-01 -6.756789294525145095e-02 -1.135793459279237777e-02 -1.356264283938585502e-01 -1.743670071820441203e-01 -2.851534194447992721e-01 +1.414213562373095034e-01 1.293299838835349769e-01 1.429536689799834337e-01 -2.148873147082717636e-02 -3.484856359768118139e-02 -2.801403215903285893e-01 -2.318950941781721536e-02 7.533187947326225320e-02 2.432030512832653868e-01 -2.802972526356074454e-02 +1.414213562373095312e-01 -7.776622914303549065e-03 1.674900555304608893e-02 3.167325707007105917e-01 2.151970695742766448e-01 -7.345142329779331958e-02 -1.155989178995300154e-01 6.843981795599761442e-02 4.053216862246396268e-02 2.104391610339764185e-01 +1.414213562373094202e-01 1.026878579572426536e-01 -1.149595356906208676e-01 -3.297792627867182635e-01 -3.716059836129323446e-02 2.730799446611758552e-01 -1.324352905712695427e-01 3.814278855801201545e-02 1.383398794590560144e-01 2.810421419728866277e-01 +1.414213562373096145e-01 -1.754156218158830702e-02 1.275416908843446107e-01 1.306922528081202739e-01 -1.239015208567169207e-01 1.122258538729656308e-01 1.269491715317504765e-01 3.103300524479494782e-01 4.830818099705854428e-03 -2.881249530972043171e-01 diff --git a/examples/dmdmd_ala12/results/iter2.ev b/examples/dmdmd_ala12/results/iter2.ev new file mode 100644 index 0000000..c1c2fb5 --- /dev/null +++ b/examples/dmdmd_ala12/results/iter2.ev @@ -0,0 +1,50 @@ +1.414213562373095034e-01 -8.054154537221829002e-02 -1.764977376533518882e-01 1.123496806337785647e-01 -7.261945375617291643e-02 2.413430510605128754e-01 1.168607587256491470e-01 8.689227303576951833e-02 -1.115442120505369533e-01 -1.558665605724779066e-02 +1.414213562373095312e-01 -1.031993015856160906e-01 -1.874862961782907123e-01 -1.482875231248905259e-02 -4.814645484276138497e-03 1.516311374427513070e-01 -2.005624122071040238e-01 -6.385059933035386326e-02 1.073048428880897520e-01 -2.035329695308352449e-01 +1.414213562373094757e-01 -9.867692109734632622e-02 4.592041825453027637e-02 -1.448399695709038371e-01 1.011382199420677308e-01 -4.240698488466286727e-03 -6.393440527089695735e-02 9.214031553724599810e-02 -9.154638435946080288e-02 6.516483408850579084e-02 +1.414213562373096977e-01 -9.844413584859065813e-02 -7.185684278335448261e-02 -1.940686726629540504e-01 1.517592645746463666e-02 5.072678857131818209e-02 -1.298923507004819122e-01 -1.543533179791800256e-02 -6.639944067572128850e-02 -1.794951321899878882e-01 +1.414213562373096145e-01 -5.832664638444624156e-02 -1.152981860759595967e-01 4.651312488303715326e-02 8.526236192793870683e-02 -2.239764660592294399e-02 4.957031190157544509e-02 1.611174654704652627e-03 1.186021343575296982e-01 -1.352292234366593571e-01 +1.414213562373095034e-01 -9.811376489035711357e-02 -7.361093136288605898e-02 -3.411089352678144115e-02 6.616833907189523245e-02 -7.859286213349393757e-02 -5.623205670942120482e-02 -1.363217038266942294e-01 2.642552416495269618e-01 2.895307675237545741e-03 +1.414213562373095312e-01 -8.927999157675070574e-02 2.025955288931558240e-01 -1.255320926116992516e-02 2.762338227638460042e-01 -4.402562670080558543e-02 -2.802587732346534938e-02 -1.271655853842019179e-01 1.789405285630984999e-01 -5.841681492124410624e-02 +1.414213562373094479e-01 2.251108807734774619e-01 7.281505097961800399e-02 1.134026018755196624e-01 3.343690054848817705e-02 9.119804947675690110e-02 -1.455131817879975475e-01 3.654519272802554675e-02 2.828789636998317591e-02 -6.320825871838710308e-02 +1.414213562373096422e-01 1.250295576450161372e-01 1.702684057587867117e-01 -2.653222280655272436e-01 2.522312196388261651e-01 4.429522523400548223e-02 8.771874288801601027e-02 2.738062655954826008e-01 6.183749634691035509e-03 -2.380248556683373651e-01 +1.414213562373096145e-01 1.745179314201602272e-01 1.535381934646646435e-02 1.503247389346584750e-01 1.643725342796922839e-01 -3.615754268133616889e-02 2.763337333782971486e-02 -1.033020288030583045e-01 -7.784223799345703354e-02 -9.580416443610349775e-02 +1.414213562373094757e-01 1.880737778483371481e-01 2.135775921663711496e-02 6.287669505891234356e-02 5.997887917423095315e-03 1.064684957629541406e-01 -2.208822590758570056e-02 6.596471011944818330e-02 2.233170656847919266e-01 -2.199911789897045500e-01 +1.414213562373094202e-01 2.112601674456696110e-01 1.219134001780116522e-01 -1.069486363084020709e-02 -1.043374877568637171e-01 1.164173084237323103e-01 2.607110268341465698e-02 -5.502977107546647151e-02 1.243030103757824245e-01 3.113164974190200662e-01 +1.414213562373095590e-01 2.126685644232815531e-01 5.579700471351632662e-02 1.072036125579246546e-01 -8.960781900669656519e-02 -1.271403725904277360e-01 5.314756315707733214e-02 -7.145179395853919202e-02 7.786399562183229928e-02 -4.313564926882303141e-02 +1.414213562373095867e-01 1.625258527118488006e-01 1.922880874404682069e-02 -2.136220577249757502e-02 -2.719046470876671645e-02 -2.721140994293581514e-02 1.327605584913425507e-01 8.909347001613486527e-02 -1.034089873220308681e-01 -6.697236016441643347e-02 +1.414213562373095867e-01 1.225854691359202636e-01 4.685187214852703716e-03 -3.994956246754129414e-01 -6.002501527010916174e-03 1.244908077519223805e-01 1.765707396338924429e-01 -3.189385427383510940e-01 -3.826408556639674524e-02 -1.358982957317287632e-01 +1.414213562373094479e-01 2.520564630747190726e-01 9.565124231462829307e-02 -6.157537344748620356e-02 -2.035957620488945130e-01 -1.115868940702565981e-01 -3.383150445688155594e-01 -1.217407002982522357e-01 -4.258593560844586845e-01 5.512657463804799922e-03 +1.414213562373094479e-01 1.943637141462822016e-01 1.113638450090714203e-04 -1.127662674459886799e-01 -8.952859900144437277e-02 1.802151330744626301e-01 -3.457613141163165538e-02 -8.801012633759294768e-02 -5.824597476503850374e-02 1.120952297562584354e-01 +1.414213562373094479e-01 1.651815992100005570e-01 -4.029649919387093097e-03 -3.383618999639521896e-02 -1.728718402329645562e-02 1.460058270550457400e-02 8.930830767930499070e-02 1.572673767374944409e-01 1.419717149139430347e-02 9.295550809859048913e-02 +1.414213562373095867e-01 1.943848041857228759e-01 8.601584519079769411e-03 2.010120391940821427e-01 -7.508927648412173916e-02 -1.686990770400390305e-01 9.261514324721498159e-02 2.750124720182708371e-01 1.505752295398135321e-01 -1.229273194112970452e-01 +1.414213562373094757e-01 1.114999303808832665e-01 -1.579333200027711603e-01 1.433010402114353044e-01 -3.072397553707595548e-03 -1.437055945847015570e-02 4.099618242914872951e-02 5.622234772951809761e-02 1.538460394232455952e-01 9.941084144194287098e-02 +1.414213562373094479e-01 1.511191136933307255e-01 -6.477750274850893608e-02 -9.341170818554268840e-02 -3.933660070155682587e-02 -1.117621173029159816e-02 1.196068769197024401e-01 -7.452129709677479674e-02 -7.756957352037086029e-02 9.347749538250366141e-02 +1.414213562373095034e-01 1.715120089716076490e-01 1.627990624836722286e-02 1.387107035809099498e-01 1.559748457974311220e-01 4.464237894898945985e-02 2.155209449238763494e-02 6.804477713099178759e-02 4.126304295363376201e-02 -1.062212689586294195e-01 +1.414213562373094757e-01 2.687395510214686811e-01 1.645308008245468523e-01 2.357215658669418734e-01 -9.499875675870890490e-02 -7.121753998612294356e-02 -4.338107026100213037e-01 6.410155886705205808e-02 6.124185316176141564e-02 5.376342684665637653e-03 +1.414213562373093924e-01 1.755983113302364562e-01 -9.454696362408034419e-03 9.597029654810096747e-03 -6.120152512355639396e-02 -1.214405141397227050e-01 6.628969880230091427e-02 -3.254029739148797118e-01 -2.018686034015313990e-01 1.402838552631702485e-01 +1.414213562373094757e-01 -5.730033153145851210e-02 7.107533610628232086e-03 -1.915633178262614034e-01 1.451780070705481762e-01 2.383456514652174812e-02 -1.298123141608547859e-01 2.708107038031993818e-01 5.691574989919728073e-02 1.919798243194825726e-01 +1.414213562373094202e-01 -7.969231788926929572e-02 -2.260472091316954035e-01 -7.465922819205350613e-02 -1.050959452105847541e-01 2.876567388886215326e-01 -3.793610484259033605e-02 9.859927034476950736e-02 -7.996344733762128509e-02 1.125541627464194810e-01 +1.414213562373095312e-01 -8.774156997323147300e-02 -1.365838247592006949e-01 -6.735745390196578621e-03 -2.746745392301290153e-02 1.237654108795868818e-01 -1.590754442225503565e-02 1.876904113463689211e-02 -2.646149098569271496e-01 -1.967562468888188754e-01 +1.414213562373094757e-01 -1.620712248081796203e-01 1.193353538374412881e-01 1.058314371493606909e-01 -1.049692623503685612e-01 1.888740039619685729e-01 7.785085974394326258e-02 1.263335638234435454e-01 1.014743704746034758e-01 1.437811035483887168e-01 +1.414213562373095590e-01 -8.645993106817465024e-02 -9.921421138005211138e-02 -1.590965524821864527e-02 3.021912436564072255e-02 -2.263481805873222286e-01 3.557864222650442693e-02 -2.729368094386172214e-02 9.958141583535087826e-02 -7.225716079768139399e-02 +1.414213562373094202e-01 -4.042323953903426137e-02 -3.975754760623164547e-02 -3.384107386806256557e-01 -9.947221891119803483e-02 -3.501512604266909801e-01 1.185947284511076477e-01 6.721459903480883624e-02 3.605264942380664861e-02 1.928795967619350571e-01 +1.414213562373094757e-01 -1.540104550410543727e-01 1.397471660632020329e-01 2.185269583423620765e-01 8.961985837730318538e-02 -1.039941811954131767e-01 -1.094307557200983883e-02 1.661506828580968098e-01 -9.947972381049424717e-02 1.628207551370520756e-01 +1.414213562373094202e-01 -1.696297073565389835e-01 1.792585600028429593e-01 2.618690058597174242e-02 -4.745798672107990474e-02 3.343777596764617721e-01 -1.085472140968953281e-01 -3.231653958061253724e-03 1.238728189818505930e-02 3.441297139776685610e-01 +1.414213562373095867e-01 -3.240579746635748049e-02 -6.466316343149731971e-02 -2.842010996790955354e-02 3.947427269381179049e-01 5.413503339889196714e-02 -1.302652665512020747e-01 -2.772428719653809992e-01 7.056354691215921404e-02 2.478576939208088636e-01 +1.414213562373095034e-01 -9.100625945725898669e-02 -2.122857648429403721e-01 -5.594621587440717914e-02 -1.313057386305563345e-01 -2.902014859676198544e-01 -2.129920748412119924e-01 -8.451412697377434780e-02 1.827411100579355296e-01 2.047148575290198488e-02 +1.414213562373095034e-01 2.521692610247138963e-02 -1.179247629219324772e-01 3.824009111117695342e-02 7.897410461495261991e-02 1.087643499991064883e-01 2.341184051519692444e-01 -4.968111345449898603e-02 -1.246121194431050183e-01 3.398889943215368387e-02 +1.414213562373094757e-01 1.506869132944953504e-01 -1.704570881759782941e-02 -1.101439710805481309e-01 -9.256219110658790716e-02 1.571659126719920363e-01 2.724153264912559380e-01 4.660986139599233857e-02 2.758128189940825536e-01 1.180343746923349230e-01 +1.414213562373095867e-01 -1.663554730959780625e-01 2.987541818889988265e-01 -4.715024853463270493e-02 -2.436802193419408957e-01 -1.100024373278643830e-01 1.039409459628395788e-01 -5.895619923094459758e-02 6.972488307876562041e-02 -8.210765443533854513e-02 +1.414213562373096145e-01 -1.785292523216025495e-01 2.595948043867395416e-01 -1.510672113983832499e-01 -3.856180731261041328e-01 5.222927585172170567e-02 -1.291840191698418079e-02 4.984979410019765161e-02 1.543188826705109429e-01 -2.278985133935897411e-01 +1.414213562373095867e-01 -8.309528879003036383e-02 5.049876514021741855e-03 6.041569658863085029e-02 1.867282573041549321e-01 4.727020610413108087e-02 9.471103461492716424e-02 -6.915764638112854683e-03 -7.540276214521100806e-02 -5.995967747813540916e-02 +1.414213562373093924e-01 -1.513694325835909238e-01 -9.928334390125347422e-03 2.504532032899297045e-01 -1.787015792303506267e-01 -1.454797948462749346e-01 1.774312321460504438e-01 -1.692104462045762037e-01 1.240107318036018542e-02 2.129149971845042677e-01 +1.414213562373096145e-01 -1.469978423208211094e-01 2.816324718912590480e-02 1.299462488467626464e-01 -1.222862629324067418e-01 -1.378554749267497104e-01 9.976816123887312371e-02 6.201235476315557216e-02 -1.160929074855754500e-01 -6.395035126574100115e-02 +1.414213562373094757e-01 -6.020076251885504715e-02 -3.095163127774679945e-01 5.922408905134910265e-03 -2.510112912529441909e-01 -2.047744811041184512e-02 1.579345969980460937e-02 4.932837143633724691e-02 5.058734155633039242e-02 -2.397507093696066294e-02 +1.414213562373095867e-01 -4.548108816676964955e-02 -1.007364376097844016e-01 1.526014608648816051e-01 1.869570634108473073e-01 -1.418848678469091240e-01 1.340717053446028040e-01 1.440247935341412433e-01 -1.383343936367767979e-01 5.401227075338138617e-02 +1.414213562373095867e-01 -1.590773702370448239e-01 2.776236324790596344e-01 6.126188492813704894e-02 1.308641632198918534e-02 1.727972206631594176e-01 -1.081226834701534550e-01 -1.347130779780051912e-01 3.515067805656793554e-02 -1.613450757749787801e-01 +1.414213562373094479e-01 -5.826407919237527183e-02 -1.245611852287571431e-01 -1.343025817984098702e-01 1.283678994106250415e-01 -1.396441291477206470e-01 -2.839298654175578807e-01 -4.662407887387949590e-02 1.643665024610585224e-01 6.511664825080243357e-02 +1.414213562373095312e-01 -1.449114622143534425e-01 1.276500244778509541e-01 1.677045271889370526e-01 7.217600154173983706e-02 3.315261327386435138e-03 9.845680904781604903e-02 -1.638591609750104927e-01 3.968422907085816798e-02 -3.074406534051637996e-02 +1.414213562373096422e-01 -9.450103841121929027e-02 -3.167304394066808859e-01 2.145765045782822011e-01 -8.536033422280815686e-02 1.378785447474858705e-01 -9.832273178544513603e-02 -1.793950580905956105e-01 -5.410793498345031760e-02 -1.929151260995172756e-01 +1.414213562373095034e-01 -8.877930880382339796e-02 1.087494957723899036e-01 -2.604251246610266631e-03 1.265580544150643749e-01 -1.955856434166516888e-01 1.837528053421435548e-01 -1.029300726176938935e-01 -1.871313324642370213e-01 -1.165548690083021977e-01 +1.414213562373095590e-01 -1.418734922331695014e-01 1.883089685186641049e-01 -3.083742528261262245e-02 -3.209348545301807243e-02 -3.907321307596100385e-02 -1.054491482713712514e-01 8.385675770395188688e-02 -2.732899842167493820e-01 6.001470229526139483e-02 +1.414213562373094202e-01 -6.078664538600273004e-02 -1.301487376766359005e-01 -1.361609182365656756e-01 6.248473878722600461e-02 -5.039405208283116028e-02 -1.254476494591438562e-01 3.315904134057459651e-01 -1.415757143711934285e-01 1.487181699966862516e-02 diff --git a/examples/dmdmd_ala12/results/iter3.ev b/examples/dmdmd_ala12/results/iter3.ev new file mode 100644 index 0000000..0732f10 --- /dev/null +++ b/examples/dmdmd_ala12/results/iter3.ev @@ -0,0 +1,50 @@ +1.414213562373095034e-01 2.272726929744537383e-01 -1.203762943134460833e-01 1.918037598205696581e-01 3.298933705993617460e-02 1.222623587772778270e-01 1.016689067236886818e-01 1.184576805354424917e-01 5.401285895306764950e-02 1.774191668765899843e-01 +1.414213562373095590e-01 1.543769566422281969e-01 1.425085679959821050e-01 1.541818525934403328e-01 8.536466988577988413e-02 -5.979523130244338014e-02 -1.439676894724935818e-01 -7.691992150947261908e-02 4.369590003663347856e-03 -9.895612414945768875e-02 +1.414213562373094479e-01 2.397150299302218124e-01 -1.210051433898782364e-01 1.443313331327157334e-01 -6.085547997441598245e-02 2.851437798624316053e-02 5.165171399000986763e-02 1.818480373857785659e-01 -2.820154469101333189e-02 -3.144066809241628097e-02 +1.414213562373095034e-01 2.612009102836815311e-01 -1.740502634278730532e-01 2.761681161074877600e-01 -1.202992882138031877e-01 2.443271391999727038e-01 1.650141282788336328e-01 3.220882284103406268e-01 -1.208666257400730221e-01 1.966103687434101466e-01 +1.414213562373095590e-01 -1.101084345308754042e-01 2.912838358389673032e-02 -2.454311899057413406e-03 -5.513908517063455250e-02 8.514360911000405652e-02 1.263538287213347155e-01 -2.608042726839758605e-03 -9.198236572313150949e-02 -4.103561171529751528e-02 +1.414213562373095590e-01 -9.935218971790155118e-02 -3.229746546303846610e-02 -9.794974665735635411e-02 4.856018984703006081e-02 1.937517677810581818e-01 2.098030212443030215e-02 -4.456259222086304816e-02 -1.441658764239748258e-01 1.333273152914904447e-02 +1.414213562373095034e-01 5.558599286075508773e-03 -3.673318162204866066e-01 -1.145364275014790489e-01 5.007988097037431308e-01 -7.049089928781442083e-02 3.300119664879288400e-02 -1.167175186469789627e-01 2.653573695191391302e-01 -7.100867802437441090e-02 +1.414213562373094757e-01 -1.636246540141965411e-02 -2.669967109322862187e-01 -3.271066830853056051e-01 1.772286868569720730e-01 1.620196507541957487e-01 -3.616433761004809316e-02 9.685389154167782511e-02 1.044742585366085358e-01 -6.579368164222444693e-02 +1.414213562373094757e-01 -1.430241460961816646e-01 -1.126557322517763721e-01 -9.039923871144547179e-03 -4.462053662590198533e-02 5.059267101204272671e-02 -5.197173821645580116e-02 -4.761171855031446493e-02 -2.387655731768802483e-02 -5.934659248781216229e-03 +1.414213562373095590e-01 -9.057409080170640558e-02 4.413901680051455709e-03 -1.050374698474459134e-01 -2.139980298252914734e-02 1.699794714684482733e-01 -6.518888414714425761e-02 -8.077907678748202924e-02 -8.306051794993257742e-02 -8.867797764639791247e-02 +1.414213562373095034e-01 -1.117828630962450775e-01 3.536221910241784533e-02 7.537929534844682589e-02 6.076969123263887412e-02 1.036349825185043927e-01 5.906473455174264531e-02 -1.452943404710501651e-01 -6.452634331784135382e-03 2.105995441708367888e-02 +1.414213562373095034e-01 -1.142460052599788278e-01 6.850736649151396851e-02 3.753447270927742080e-02 -7.354779358925059296e-02 2.097684368802049948e-01 1.540982805562866320e-01 -3.048869657602433225e-01 6.911372603836236916e-02 3.483554014661519732e-02 +1.414213562373095867e-01 -1.052729724466239941e-01 -1.163281104701242331e-02 1.662665667071007783e-02 -5.533759935130247443e-02 5.320239681180657237e-02 1.549093055258226603e-01 -1.933172277601758193e-01 -1.315214334857800205e-01 -5.091077660564474749e-02 +1.414213562373094757e-01 -8.001175405192006984e-02 7.252783087299380371e-02 -4.098851355837872246e-02 3.670598664922370379e-03 8.202612149285497256e-02 -1.493593556120706434e-01 1.882745656037602619e-03 -1.341708687356922558e-01 2.377373037422615132e-01 +1.414213562373095312e-01 -8.999732628576349869e-02 2.415618716314708522e-02 1.315926932591793448e-02 4.148031520301859176e-02 1.332122952925574033e-01 1.444342570267754568e-02 -8.487629809203256492e-02 3.618499663230403279e-04 9.696551664384536751e-02 +1.414213562373095590e-01 -7.790258834329043258e-02 1.244092524711102044e-01 -8.448403902731514703e-02 5.683280407172926207e-02 -2.848018541179153651e-01 3.415878163535816525e-01 -2.477884211980205600e-03 9.662002077575435055e-02 1.944865283563544378e-01 +1.414213562373095590e-01 -1.204469083183954542e-01 4.130824371948849105e-02 -3.961268292658430036e-03 -6.615301695153817663e-02 8.041688889410682217e-02 -1.772968420497895436e-01 8.740262455312745871e-02 -8.624270859587282456e-02 9.165244058474016076e-02 +1.414213562373095867e-01 -1.085236277665966587e-01 -1.249326331595342066e-01 -1.049019875440478922e-01 1.624646509492192192e-01 -1.073208356816812842e-01 1.108436482190511101e-02 8.912861964686565053e-02 -1.238094472451954642e-01 -2.622567957747826140e-01 +1.414213562373095312e-01 -1.707561788547470039e-01 -1.039270719872929932e-01 2.943322780180611387e-02 -1.728760282147745464e-01 6.271384698536741631e-02 -1.054697220751039249e-01 1.975611501887420962e-01 2.080010269007585288e-01 -2.559170771877684603e-01 +1.414213562373094479e-01 -8.756554812502362339e-02 1.101579322149231696e-02 6.297114239254966717e-02 3.095511432569013066e-01 -2.419483369615389179e-01 -2.392433353790046902e-01 2.442649329905060285e-01 -2.333875373087509753e-01 1.588444737818377750e-01 +1.414213562373094202e-01 1.871446390988990016e-01 6.999981752522212164e-02 1.055802485658132450e-01 -1.987390286052656205e-02 1.445335078715110910e-01 -5.388198743795538474e-03 -1.898139853993527082e-01 -1.658825370495384255e-01 -2.948905543526696427e-01 +1.414213562373094757e-01 -1.560271623731276924e-01 -3.251656532141249806e-02 -1.302184788223705036e-01 -9.363721985812469006e-02 -1.765025930161262802e-01 4.790250116988418183e-01 2.042394985189324164e-01 -2.673394352099128790e-02 2.730074821412821484e-02 +1.414213562373095867e-01 -1.295905025142481126e-02 2.172884234015600435e-01 -1.489297971916708208e-01 9.945105721744796831e-03 -1.263745232606390823e-01 1.081110301576706234e-01 1.286035669406679349e-01 1.811790399654466532e-01 2.494751969222652466e-01 +1.414213562373094479e-01 -1.483342422390716564e-01 -8.996036809826329916e-02 2.665541007904162832e-02 -1.130607813218972024e-01 -2.605866271720487862e-02 1.596192930057821202e-01 -1.577665530395837637e-02 -1.246113547489464263e-01 -1.907509485240943548e-01 +1.414213562373094757e-01 -4.344045396516811944e-03 2.125850374009163601e-01 -1.814834217826965523e-01 -4.167813924771349154e-02 -8.652570412419648832e-03 -4.521961429473871086e-02 1.717241193598966209e-01 1.629267278447951023e-02 6.165378122834505592e-02 +1.414213562373095034e-01 -1.906679591966173870e-01 -2.256009207624221080e-02 1.078302938625712720e-01 -2.907737079063277275e-01 -9.585793925120844605e-02 -4.182927738239110294e-02 1.765044423251444505e-01 9.213923229887122091e-02 -1.329345154484590230e-01 +1.414213562373096145e-01 -1.496317831145520250e-01 -1.579481497702215353e-01 6.524911680664942371e-03 -4.056384004238722252e-02 3.672575797182906637e-02 -1.844152601043132222e-01 2.166082267255684812e-01 2.060538847120793604e-01 -2.422931407244478808e-01 +1.414213562373095034e-01 1.733492134087483705e-01 7.645275783379738843e-02 -3.568510780304522123e-02 -7.460135804558673533e-02 2.170718813709103176e-02 -1.208018655830123966e-01 -8.279156200917663772e-03 -4.629544680430861675e-02 3.848420937861928709e-02 +1.414213562373095034e-01 6.962700318504985025e-03 1.348195716448067627e-01 -3.143758112847189756e-01 -2.016292479698262308e-01 -1.024412741316211711e-01 -1.010327085332930752e-01 2.791527274834128963e-02 -6.439659016524179602e-02 -1.903997150710750458e-02 +1.414213562373094757e-01 -1.577953280688479676e-01 -4.522060001470042806e-02 1.890476109656387127e-01 3.736139246618008000e-03 -9.532223348235796534e-02 9.716293857685906477e-02 -7.193215526845589403e-02 2.151416814530071608e-02 -1.065151073740484983e-01 +1.414213562373095590e-01 -1.491528773100360972e-01 -1.545570951657826604e-02 1.048161010025246975e-01 1.558292343984379880e-02 -3.584525097535053856e-02 5.687362312468136061e-02 -1.122372470098809416e-01 -4.154685899372799474e-02 1.551507942670391545e-03 +1.414213562373095312e-01 -5.344595783274676271e-02 5.180623674433197656e-02 -1.199722250437727650e-01 -2.521363014228373070e-02 1.909171754542496324e-01 -1.214881614913380786e-01 -8.149758815259541822e-02 -1.451926217432998878e-01 8.324599083136052791e-02 +1.414213562373096700e-01 -1.294830603097949784e-01 -3.842962420209097840e-02 7.605201131527537795e-02 1.758132108748466371e-01 -7.523482615450810540e-02 7.691332310518619875e-02 -5.450607207778231794e-02 -1.560098529181781768e-01 -7.268646360606025210e-03 +1.414213562373093924e-01 1.518125126867297670e-01 -2.909498160462533831e-02 -1.023215212671529373e-01 -2.925763820695057374e-02 2.003848401226855092e-01 6.312001315307370908e-02 -1.537053997616141809e-01 3.295855057535459348e-02 1.312595154133468743e-03 +1.414213562373094757e-01 1.274331757606704529e-01 2.030639296222835344e-01 2.402733232972504782e-02 1.654736739014413816e-01 -1.277816242282679704e-01 -1.089207029009004422e-02 -6.650507937039983053e-02 -3.601731252164889173e-03 -1.051401212882505931e-01 +1.414213562373094479e-01 2.597136141754025629e-01 -2.593909824884457205e-01 -9.646369553091738158e-02 -3.425083822711185166e-01 -4.713400380945681478e-01 4.732297732286815106e-02 -2.217258896090633091e-01 -2.256472171376908420e-01 -6.457902245694946419e-02 +1.414213562373093924e-01 9.443856799966091065e-02 3.171152341851586898e-01 -4.857764425824607005e-03 4.000912334379405633e-02 2.942639006312671238e-02 1.775788133641486022e-01 4.366455215209634477e-02 2.070943706148270502e-01 -1.712839610585017436e-01 +1.414213562373095034e-01 1.898359607115391035e-01 2.124315504413420430e-01 2.183481466245917046e-01 9.513618586797795151e-02 -4.484091839883326547e-02 -5.121658851007179075e-02 -6.122038942731591188e-02 -1.263489692477028359e-01 -2.452834057252219480e-01 +1.414213562373093924e-01 1.500331816600561363e-01 1.350042405704263981e-01 5.472489387352929419e-02 2.103122759566339040e-01 -9.619227133768426530e-02 -8.185003076924224352e-02 2.716894608508968467e-01 -1.282187486156970702e-01 -2.124351730553758200e-01 +1.414213562373093647e-01 1.440168799975334590e-01 1.768090374942564713e-01 -3.616153224860897686e-02 9.664534048420464485e-02 5.497740297172621499e-02 7.529041254012062978e-02 1.289992642505832787e-01 -1.750262838809439961e-02 -5.077640251819610234e-02 +1.414213562373094757e-01 1.339317789340411513e-01 7.046976667707907649e-02 -5.424935571417426744e-02 3.437126085483322661e-03 6.353463712206364189e-02 4.067816638294487197e-02 -1.314467553366562569e-01 2.467664891821167994e-01 3.314198822386160703e-02 +1.414213562373094757e-01 1.234481081618608450e-01 1.144822990767986881e-01 -1.025188530557242794e-01 1.891176510225094781e-02 -1.403325930627662976e-01 7.541913509162871676e-02 3.210878910077180626e-02 2.312745239005612741e-01 1.147110481240004309e-01 +1.414213562373094202e-01 -1.484744331725917910e-01 -7.038456085127292594e-02 1.616135656978400503e-01 1.274785686187274725e-01 -1.068815016816317270e-01 -3.415496719009915999e-02 -5.005393649102168191e-03 -1.761157162459037195e-01 1.763201128982586352e-01 +1.414213562373094757e-01 -7.637786730824104586e-02 8.739325201540801280e-02 -3.600242423212617754e-02 1.545471373578860552e-02 1.068580893680848992e-01 -1.274601255983519865e-01 6.336346757629295057e-02 -5.552736626593125779e-02 2.209247625583175278e-01 +1.414213562373095312e-01 -1.699323761324087190e-01 5.014918374879123036e-02 3.705544701827303000e-01 -1.641103826821573297e-01 -1.695661924831500522e-01 -2.651565294635371828e-01 -8.152859746704121946e-02 4.450493511790851731e-01 2.447183318235712085e-02 +1.414213562373094757e-01 -1.635144966646699671e-01 2.055184734942683972e-02 1.896362392870626634e-01 -1.230190568812662699e-01 -1.117139077139161704e-02 -2.656728512965968181e-02 3.383472698491585273e-02 -3.633040300829432079e-02 1.359173356743324235e-01 +1.414213562373095867e-01 1.369328521229171147e-01 -1.430226000369589356e-01 9.538431539124155034e-02 8.151603303494303621e-02 -1.301908365155071412e-01 -1.593305914377278198e-01 -3.000654807464123164e-01 8.778648453287618558e-02 2.485265762144340806e-01 +1.414213562373095312e-01 1.059860071788512048e-01 1.030129211486345148e-01 -1.148267610807296585e-01 -5.194477019950511504e-02 1.460833179622708644e-01 1.099282883249370901e-02 -3.772564335241478106e-02 1.367057734329988061e-01 -5.496668232796032838e-02 +1.414213562373095034e-01 2.058088721086593631e-01 -3.342395216805971736e-01 -1.679438856103750719e-03 -1.333134064212471714e-01 7.245510088374651492e-02 1.047423963117205536e-02 9.785943967585283843e-02 9.806090344951517990e-02 7.931439040956843323e-02 +1.414213562373095312e-01 8.024554669417514885e-02 -2.236273207916513947e-02 -3.129004180124289602e-01 -1.611603759550422066e-01 -1.198077768208934829e-01 -2.933743530039382708e-01 -4.118807077749997436e-02 -2.163796189655501148e-02 2.516654698110090335e-02 diff --git a/examples/dmdmd_ala12/results/iter4.ev b/examples/dmdmd_ala12/results/iter4.ev new file mode 100644 index 0000000..289cd44 --- /dev/null +++ b/examples/dmdmd_ala12/results/iter4.ev @@ -0,0 +1,50 @@ +-1.414213562373095590e-01 -1.641215623010496838e-01 3.825183238805905835e-03 1.421992450328922464e-01 -2.956405769811463330e-02 -1.604954311563127137e-02 -1.798054696386116591e-01 -3.400554123681068242e-02 -3.049179192618984430e-02 -1.577335223568161748e-02 +-1.414213562373094202e-01 -1.843026592807075759e-01 -1.301374127357976529e-01 8.543804823549423777e-02 -1.617101292054300421e-01 -1.748502812362021652e-01 -1.716457911341851550e-01 6.887866422141542509e-03 1.949451002230467300e-01 1.311736602572779464e-01 +-1.414213562373094757e-01 -1.378680488773917634e-01 -4.722611024076429909e-02 1.003781969064161395e-01 6.685181660695875550e-02 -3.183393934743881243e-02 -8.625105886013098577e-02 3.066620868116930188e-02 2.792605718673702581e-02 5.197506514814412629e-03 +-1.414213562373095312e-01 -1.526063940834867516e-01 -2.514399118484704834e-02 1.271090563558952002e-01 7.592657255581447551e-02 -2.019254441777295628e-01 2.194098689872045135e-03 3.522066826201298434e-02 -5.507335232571041600e-02 1.497851091410202368e-02 +-1.414213562373094202e-01 -1.620325416055067858e-01 -1.716297313643389000e-02 1.169737757958775742e-01 -2.703439609513283437e-02 -6.817289179854404968e-02 8.384583748520728352e-02 1.597620027647557728e-01 1.358076376524810502e-01 -7.460321680789656906e-02 +-1.414213562373095034e-01 -1.391016589017233240e-01 -3.371471907351385883e-02 7.841945900211244602e-02 4.842074075806374750e-02 -4.757930248726939537e-02 1.632176234370030440e-02 -2.238586743215861818e-02 -6.951589335524213653e-02 -2.233860896344762315e-02 +-1.414213562373093647e-01 -1.482999396774403456e-01 -1.256601687538460854e-01 2.226406363019872992e-01 2.238771765657290302e-01 5.593053147949017534e-02 2.543971828223455800e-01 1.616038070536385818e-01 -1.412034778824933744e-02 8.414066491666688519e-02 +-1.414213562373096145e-01 -1.071069565435321114e-01 -1.027811148789994911e-01 4.645155166190646084e-02 1.608931174623020044e-01 -1.811761763918099122e-01 -1.368187732761211584e-01 -5.397244834916940792e-02 -1.854200904148351620e-02 2.748116974230962462e-01 +-1.414213562373095034e-01 3.636681724273024829e-02 -1.674886441410581572e-01 -1.617291443209314672e-01 2.246554029929857255e-01 7.810369369720689126e-03 -9.713904623124210158e-02 -4.435598730441624171e-02 2.507567542316481157e-01 4.489274197604565218e-03 +-1.414213562373095590e-01 9.537822769813526780e-02 -4.273861035985865864e-01 -2.142255194518881134e-01 -9.167032738595067010e-02 -1.931883657450017278e-01 -1.335494595844267385e-01 5.768855840310930377e-02 -3.046795581077387238e-01 -2.427055907490690556e-01 +-1.414213562373095590e-01 7.865872462512046859e-02 -2.051581906176673797e-01 -6.497715116743840724e-02 2.695323850755939055e-01 -4.265643375437962181e-02 4.751261622699683856e-02 8.001879459682413598e-02 1.887725354044917647e-01 -4.955410177025131729e-02 +-1.414213562373095590e-01 4.568619279586545040e-02 -3.613693771911686281e-01 -2.243999803750513222e-01 -7.254733426681944652e-02 -2.667114568675598221e-02 2.215808432924328830e-01 -1.344991761101163863e-01 -1.367967056843935048e-01 -1.828015966854571184e-01 +-1.414213562373095312e-01 -9.350571169077805805e-03 8.732277702222811244e-02 -1.625152593053247052e-01 1.274150313102394572e-01 -1.665080964951339004e-02 -4.935395347632097474e-02 1.770039626313758552e-01 2.416927165518082676e-01 -1.217373566754274966e-01 +-1.414213562373095590e-01 6.458067887468252333e-02 -3.013898755777027483e-01 -1.172977053995716973e-01 2.238269644868972619e-01 -2.318964131975814469e-01 3.257914287857124631e-03 -1.212024620574766454e-01 -1.155183113655629083e-02 1.050129686744426111e-01 +-1.414213562373095312e-01 1.431691695778932183e-01 -3.406101299440539298e-02 -4.691837326861270779e-02 -1.047632439596894033e-01 2.873632627445926041e-02 1.500162608335276482e-01 8.787903095981276780e-02 -2.759632885730779472e-01 -2.296876270908210782e-01 +-1.414213562373095867e-01 2.106581342188041106e-01 -1.443635253914930978e-02 8.875677799640395438e-02 -7.295110879230155831e-02 -7.769191886387083468e-02 1.397091264694025857e-02 -1.542002888159624448e-02 3.635355434853555084e-02 2.011559706297403882e-01 +-1.414213562373095312e-01 2.101246284946977350e-01 1.033584588402750998e-01 1.865187178034484750e-01 3.151485415488426700e-02 -3.838644693311721312e-02 -1.254330051105945476e-01 -1.287266177184731852e-01 1.102610208415015364e-01 1.332612388510991813e-02 +-1.414213562373095590e-01 2.349372911350685600e-01 -1.021459138993006388e-01 7.271541413846106805e-02 -4.288565393281510429e-01 -2.210503989119793067e-01 1.191501378352107926e-01 4.729379953473908382e-01 1.597803281553435151e-02 3.289595515465107423e-01 +-1.414213562373094202e-01 1.739668358527515779e-01 -2.052713441464279129e-02 4.266468738027518609e-02 -5.193006593267896626e-02 8.199230120194236915e-02 6.499750158859599058e-02 -1.384161346580098928e-01 -1.028218291361627096e-01 1.674603524878839622e-01 +-1.414213562373095034e-01 3.364654217042589018e-02 1.669292816249605127e-01 -7.758554836936643051e-02 1.795947704786852728e-01 6.071610171900271996e-02 -1.234836702964389327e-01 2.813154168205119765e-01 -1.892865620411122302e-02 -2.451092741340618053e-01 +-1.414213562373094202e-01 -1.500152163991967380e-01 -4.301959605976533180e-02 1.571965850980840962e-01 1.597487378948291847e-01 1.627487583040053420e-01 3.262235210516712391e-01 9.805551662274937172e-03 -6.376250448001122284e-02 6.933973902391105115e-02 +-1.414213562373095867e-01 1.834783174642257986e-01 -3.210291471892541635e-03 1.556694030640902171e-01 8.144508927876832616e-02 -6.499814665043189381e-03 3.378209916302473553e-02 -2.560064179734086176e-01 -3.171682784401600591e-02 3.881999134295626569e-02 +-1.414213562373095590e-01 1.417750357844675124e-01 -6.372672372924700901e-02 1.011767191193873282e-02 7.341021316824680731e-02 3.100866214951941147e-01 -2.642479044618310513e-01 -7.769432619798094519e-02 -3.287854549970341544e-01 6.250401164818858435e-02 +-1.414213562373095034e-01 2.162411855237787728e-01 1.213855409033195443e-01 2.465074832205340627e-01 -9.862465602782166663e-02 -2.891281598588010260e-01 1.253092142824446253e-01 -2.722642437525359393e-01 1.977081846360836392e-01 -2.165885313794178590e-01 +-1.414213562373095312e-01 1.724002467090545720e-01 1.264056973084375923e-01 4.601212247131029193e-02 -7.664066882022974037e-02 2.815738693405282073e-02 4.114460805904585766e-02 1.469453706328987808e-01 6.262716460465581059e-02 -1.159908175311585854e-01 +-1.414213562373095867e-01 1.640995551379845485e-01 1.460731427736626231e-01 9.668956639492454208e-02 -8.822768131523167287e-03 -6.946004028000157815e-02 2.805969937653323559e-02 -1.022803517532794998e-01 -1.151059046244928413e-01 -2.129281062872885044e-01 +-1.414213562373094479e-01 1.682256759749223007e-01 1.814250367381778639e-01 1.388384768033234518e-01 1.022556649266568862e-01 -9.809407553646373734e-02 -1.340364448325561397e-01 -7.430256715597302608e-02 -2.178046651131701136e-02 -2.121146816461657036e-01 +-1.414213562373093369e-01 -5.084066685933053692e-02 1.879944610095376223e-01 -2.135822265293383371e-01 -1.367235133466458696e-01 3.100868954037859504e-02 -4.907521797857153367e-02 -8.796414658775451867e-02 -1.103691669952370225e-01 1.643893346088422525e-01 +-1.414213562373096145e-01 -5.551771948831119019e-02 1.556229758180758815e-01 -1.969729567531615655e-01 -9.439617254228178933e-02 -1.262808554262863925e-01 -4.608502309732103591e-02 -7.350741860658938087e-02 -9.644509009828515500e-02 1.279069561737750937e-01 +-1.414213562373093924e-01 -1.953245208719852077e-01 -4.602916383878274086e-03 1.871626135600227281e-01 -2.162146516038416233e-01 2.872303177382846268e-02 -4.029287958920071966e-02 -5.465900538532781489e-02 -6.717581630967398021e-02 -3.250020778678763822e-02 +-1.414213562373095034e-01 1.565955698473621982e-01 9.191264596891958460e-02 2.834467280657968977e-02 5.630020203613927271e-03 1.356867822270018675e-01 -1.068174137468436424e-01 4.961968332067531046e-02 5.881718554391818926e-02 -1.551700912719150005e-01 +-1.414213562373095312e-01 1.901900973257553695e-01 -1.070616501653824104e-01 1.113685805107722526e-01 7.004020047482861777e-02 1.049626795113246663e-01 -6.789120741710119589e-02 3.572417112917578973e-03 1.293787154029354784e-02 4.568420552832015008e-02 +-1.414213562373093647e-01 -1.641945713399454443e-01 2.139534291773172517e-02 1.237603089444099524e-01 -5.427254926184921918e-02 -1.963363897807443234e-02 -1.660082308079491586e-01 9.107981201624327713e-03 -2.992005889531030791e-02 -8.572677166045861163e-02 +-1.414213562373093924e-01 -1.777213376295681824e-01 -5.740059961496252888e-02 2.979606535796558431e-01 1.492617486356877521e-01 -4.373473416923505386e-02 -1.672129346839396893e-03 1.817922265535293624e-01 -1.776819984092146143e-01 -2.368267940107768657e-02 +-1.414213562373095590e-01 -5.090696562606598918e-02 3.127915417568973011e-02 -2.208231650580931849e-01 2.507885874864596021e-02 1.002844416839853703e-01 9.434446035598920144e-02 7.632645215179431619e-02 1.533782892078529303e-01 -4.387943323624895336e-02 +-1.414213562373092259e-01 -1.335284245607378240e-01 1.192414670265240333e-02 -3.819235918443744660e-02 -4.626548013196899595e-02 1.094481153361351877e-01 -2.329278253544042609e-02 -2.218773382147928505e-02 8.420594847745516143e-02 -1.540587191075649121e-01 +-1.414213562373095867e-01 -1.813475910637801503e-01 4.889233029914065443e-02 9.090375058195589164e-02 -4.779870985597017147e-02 2.806496261165679629e-01 3.020381392451678138e-01 3.847478895497260382e-02 -1.754151210208043099e-01 -1.261063950367675712e-01 +-1.414213562373095312e-01 -3.888065361966799166e-02 1.138415774460592861e-01 -5.787799507512479680e-02 2.769261011064477751e-01 -2.820417035991462304e-02 1.109912106302789365e-02 -6.814348401875990058e-02 -7.092925041048309120e-02 1.917526173332487482e-01 +-1.414213562373095867e-01 -4.114569510885039694e-02 1.816968381802051558e-01 -1.589314714705679921e-01 3.966614694494661336e-02 -4.536473545491171572e-02 -5.425063485498551885e-02 -5.160786463405498542e-02 6.926332158590944865e-02 1.130955833546094629e-02 +-1.414213562373093647e-01 -8.475063963400926437e-02 2.100554036958008630e-01 -7.932458440126127774e-02 -1.974529276182357407e-03 -1.182593796521761859e-01 -1.993099611392993853e-01 9.923140867473841109e-02 -2.527798697165395403e-01 4.306033123692043496e-02 +-1.414213562373096700e-01 1.730864929964932297e-01 8.973307838660794788e-02 4.547962121581057560e-02 -3.664842624822271105e-02 3.251502489387472078e-02 1.187740115664651236e-01 3.454521368211690285e-02 2.224879370983730564e-01 -1.705518643864670225e-02 +-1.414213562373096145e-01 1.774818118699786340e-01 -9.633723211696386401e-02 -4.201884377652230149e-03 -3.182162741234577374e-02 5.192845492996966961e-01 -9.370696932676859936e-02 1.536762619601248214e-01 1.016503626252026199e-01 2.122322399356734446e-01 +-1.414213562373094757e-01 -1.791040357766290336e-01 -9.850117078969738982e-02 2.417679037844147616e-02 -2.080810077532854463e-01 1.724411559357872936e-01 -9.643704268589081696e-02 -2.642179894490424563e-01 1.221843582869259898e-01 1.257507159435595490e-01 +-1.414213562373093369e-01 -3.699550564984006862e-02 7.710385001932879012e-02 -2.108222072871654140e-01 -1.137584030813594375e-02 3.893424766230423051e-02 -5.139269087697197202e-02 7.659068580315585295e-02 9.669542130776909161e-02 1.267165160246976063e-02 +-1.414213562373095034e-01 -1.490833188646926988e-01 -2.005231409761893957e-01 -4.025146207460628817e-02 -1.871135648980572774e-01 9.206007483395116375e-02 -1.655537043805602737e-01 -1.104860242626560657e-01 2.987873832927650519e-01 -1.537372179778939696e-01 +-1.414213562373093647e-01 -1.948778853244096942e-01 5.451543934267212566e-02 4.977628484740822395e-02 -2.835886645944369899e-01 6.368599945430958309e-02 6.150299796718487755e-02 -5.597334550589635332e-02 4.002172384188584092e-02 -1.581634007970900146e-01 +-1.414213562373094202e-01 -6.130826194511731358e-02 1.497860663321534946e-01 -1.710989062771070268e-01 -3.448097642560140480e-02 -8.108901778664644178e-02 -1.078573353783330857e-01 4.106157980564541926e-02 -1.293091993030974218e-01 8.730180789896725690e-02 +-1.414213562373094202e-01 -5.804458878261541804e-03 8.665609367636896432e-02 -2.149048468824616420e-01 -7.929570070004965388e-02 2.347040897959027858e-02 3.429397211490620156e-01 -3.521446864977006430e-01 -2.366886314978692424e-02 8.206268135226385541e-02 +-1.414213562373094757e-01 -5.188233612948631862e-02 2.079729619010905750e-01 -7.493619596138749450e-02 1.534761184683491042e-01 -8.909373312634727426e-02 2.359003959141167117e-01 1.085175712952849390e-02 2.458348846738602368e-03 1.884821493911400803e-01 +-1.414213562373094202e-01 -5.324263433392888156e-02 5.176697492510924647e-02 -2.166050115112454488e-01 -2.495275833196530443e-02 -6.903898533754719569e-02 1.709010288049084558e-01 1.324956383238727609e-01 6.801346358385305935e-02 -6.052124852122822696e-02 diff --git a/examples/dmdmd_ala12/rundmdmd.py b/examples/dmdmd_ala12/rundmdmd.py new file mode 100644 index 0000000..b0b2318 --- /dev/null +++ b/examples/dmdmd_ala12/rundmdmd.py @@ -0,0 +1,74 @@ +from wrappers import grompp, mdrun, lsdmap, selection, reweighting +from wrappers.tools import pack +import dask.bag as db +import shutil + +start = 'start.gro' +topol = 'topol.top' +mdp = 'grompp.mdp' +lsdmap_config = 'lsdmap.ini' +atom_selection = "'not element == H'" +nreps = 50 +ncycles = 5 + +grompp.DEFAULTS['-f'] = mdp +grompp.DEFAULTS['-p'] = topol +lsdmap.DEFAULTS[0] = 'mpirun -n 2 lsdmap' +lsdmap.DEFAULTS['-f'] = lsdmap_config +lsdmap.DEFAULTS['-s'] = atom_selection + +startfiles = [start,] * nreps +wfile = None + +for cycle in range(ncycles): + ginps = [] + for i in range(nreps): + ginp = grompp.new_inputs() + ginp['-c'] = startfiles[i] + ginps.append(ginp) + + b = db.from_sequence(ginps).map(grompp.run) + print 'Starting grompp runs...' + gouts = b.compute() + + minps = [] + for i in range(nreps): + minp = mdrun.new_inputs() + minp['-s'] = gouts[i]['-o'] + minps.append(minp) + + b = db.from_sequence(minps).map(mdrun.run) + print 'Starting MD jobs...' + mouts = b.compute() + + crdfiles = [mout['-c'] for mout in mouts] + crdlist = pack.pack(crdfiles) + + print 'Running LSDMap...' + linp = lsdmap.new_inputs() + linp['-c'] = crdfiles + linp['-t'] = start + if wfile is not None: + linp['-w'] = wfile + + lout = lsdmap.run(linp) + + shutil.copy(lout['-ev'], './results/iter{}.ev'.format(cycle)) + + print 'Running selection...' + sinp = selection.new_inputs() + sinp['-s'] = lout['-ev'] + sinp[1] = nreps + + sout = selection.run(sinp) + + print 'Running reweighting...' + rinp = reweighting.new_inputs() + rinp['-c'] = crdlist + rinp['-n'] = lout['-n'] + rinp['-s'] = sout['-o'] + + rout = reweighting.run(rinp) + + startfiles = pack.unpack(rout['-o']) + wfile = rout['-w'] diff --git a/examples/dmdmd_ala12/scriptlsdmap.py b/examples/dmdmd_ala12/scriptlsdmap.py new file mode 100644 index 0000000..0bb896e --- /dev/null +++ b/examples/dmdmd_ala12/scriptlsdmap.py @@ -0,0 +1,46 @@ +import sys +import os +from math import exp +import ConfigParser +import numpy as np +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from densplot import hist2d + + +a=np.arange(1,20,1) +b=np.arange(20,50,10) +b2=np.arange(50,700,50) +c=np.append(a,b) +c=np.append(c,b2) +for i in c: + print i + plt.clf() + plt.xlabel('DC1', size=16) + plt.ylabel('DC2', size=16) + + dcs = np.loadtxt("results/iter"+str(i)+".ev") + dcs = dcs[:,0:3] + + #prevent flipping + if max(dcs[:,1])/dev/null 2>&1", shell=True) + subprocess.call("echo 0 | g_gyrate -xvg none -f " +gro_file+ " -s " +gro_file+ " 1>/dev/null 2>&1", shell=True) + + tphi = np.loadtxt('rmsd.xvg') + tpsi = np.loadtxt('gyrate.xvg') + weight = np.loadtxt(w_file) + + x = tphi[:,1] + y = tpsi[:,1] + + nbins = 100 + x, y, z = hist2d.make(x, y, nbins, nbins, plot_style='scatter', weight=weight, free_energy_plot=True, idx_smoothing=3) + cp = plt.scatter(x, y, s=10, c=z, marker='o', linewidth=0.)#, vmax=3.5) + print "Free energy in range:", min(z), max(z) + plt.xlabel('RMSD (nm)', size=16) + plt.ylabel('Rg (nm)', size=16) + + cb = plt.colorbar(cp) + pad = 10 + cb.set_label(r'Free Energy (kcal/mol units)',labelpad=pad) + plt.axis([0.0,1.0, 0.4,1.4]) + plt.savefig('plot_rgrmsd_iter'+str(i)+'.png', bbox_inches='tight') diff --git a/examples/dmdmd_ala12/start.gro b/examples/dmdmd_ala12/start.gro new file mode 100644 index 0000000..e91c093 --- /dev/null +++ b/examples/dmdmd_ala12/start.gro @@ -0,0 +1,135 @@ +Generated by trjconv : Protein t= 0.00000 + 132 + 1ACE HH31 1 50.3645 50.6820 50.2925 + 1ACE CH3 2 50.3665 50.7360 50.3875 + 1ACE HH32 3 50.4705 50.7640 50.4045 + 1ACE HH33 4 50.3095 50.8290 50.3925 + 1ACE C 5 50.3095 50.6410 50.4915 + 1ACE O 6 50.1885 50.6230 50.4845 + 2ALA N 7 50.3955 50.5620 50.5555 + 2ALA H 8 50.4925 50.5840 50.5355 + 2ALA CA 9 50.3595 50.4470 50.6365 + 2ALA HA 10 50.4415 50.3760 50.6345 + 2ALA CB 11 50.3305 50.4880 50.7805 + 2ALA HB1 12 50.3155 50.3930 50.8325 + 2ALA HB2 13 50.2615 50.5710 50.7925 + 2ALA HB3 14 50.4255 50.5190 50.8255 + 2ALA C 15 50.2465 50.3660 50.5735 + 2ALA O 16 50.2815 50.2990 50.4755 + 3ALA N 17 50.1275 50.3680 50.6335 + 3ALA H 18 50.1235 50.4360 50.7075 + 3ALA CA 19 50.0155 50.2810 50.6015 + 3ALA HA 20 50.0495 50.1790 50.6165 + 3ALA CB 21 49.8985 50.3050 50.6955 + 3ALA HB1 22 49.8615 50.4070 50.6785 + 3ALA HB2 23 49.9365 50.2950 50.7965 + 3ALA HB3 24 49.8155 50.2370 50.6755 + 3ALA C 25 49.9805 50.3040 50.4555 + 3ALA O 26 49.9825 50.2040 50.3835 + 4ALA N 27 49.9695 50.4290 50.4115 + 4ALA H 28 50.0065 50.5000 50.4735 + 4ALA CA 29 49.9335 50.4620 50.2745 + 4ALA HA 30 49.8265 50.4430 50.2635 + 4ALA CB 31 49.9305 50.6140 50.2645 + 4ALA HB1 32 49.8715 50.6540 50.3465 + 4ALA HB2 33 49.8825 50.6390 50.1695 + 4ALA HB3 34 50.0305 50.6590 50.2575 + 4ALA C 35 50.0255 50.3980 50.1715 + 4ALA O 36 49.9765 50.3430 50.0735 + 5ALA N 37 50.1555 50.4130 50.1975 + 5ALA H 38 50.1775 50.4620 50.2835 + 5ALA CA 39 50.2605 50.3600 50.1115 + 5ALA HA 40 50.2445 50.3960 50.0105 + 5ALA CB 41 50.3965 50.4160 50.1535 + 5ALA HB1 42 50.4715 50.3850 50.0805 + 5ALA HB2 43 50.4265 50.3770 50.2505 + 5ALA HB3 44 50.3935 50.5250 50.1525 + 5ALA C 45 50.2625 50.2080 50.1095 + 5ALA O 46 50.2605 50.1510 50.0005 + 6ALA N 47 50.2655 50.1390 50.2235 + 6ALA H 48 50.2775 50.1890 50.3105 + 6ALA CA 49 50.2495 49.9950 50.2345 + 6ALA HA 50 50.3315 49.9420 50.1845 + 6ALA CB 51 50.2535 49.9410 50.3765 + 6ALA HB1 52 50.2365 49.8330 50.3705 + 6ALA HB2 53 50.1845 49.9860 50.4485 + 6ALA HB3 54 50.3515 49.9570 50.4225 + 6ALA C 55 50.1205 49.9500 50.1675 + 6ALA O 56 50.1205 49.8590 50.0855 + 7ALA N 57 50.0035 50.0070 50.1975 + 7ALA H 58 49.9995 50.0700 50.2755 + 7ALA CA 59 49.8725 49.9750 50.1445 + 7ALA HA 60 49.8425 49.8730 50.1725 + 7ALA CB 61 49.7775 50.0710 50.2155 + 7ALA HB1 62 49.8115 50.1730 50.1985 + 7ALA HB2 63 49.7645 50.0520 50.3215 + 7ALA HB3 64 49.6795 50.0510 50.1715 + 7ALA C 65 49.8695 49.9870 49.9935 + 7ALA O 66 49.8505 49.8860 49.9265 + 8ALA N 67 49.8925 50.1080 49.9415 + 8ALA H 68 49.9215 50.1840 50.0005 + 8ALA CA 69 49.9125 50.1210 49.7985 + 8ALA HA 70 49.8085 50.1140 49.7645 + 8ALA CB 71 49.9565 50.2640 49.7665 + 8ALA HB1 72 50.0515 50.2880 49.8135 + 8ALA HB2 73 49.8855 50.3420 49.7925 + 8ALA HB3 74 49.9815 50.2640 49.6605 + 8ALA C 75 50.0095 50.0260 49.7305 + 8ALA O 76 49.9845 49.9870 49.6165 + 9ALA N 77 50.1245 49.9960 49.7915 + 9ALA H 78 50.1565 50.0560 49.8665 + 9ALA CA 79 50.2145 49.8950 49.7405 + 9ALA HA 80 50.2355 49.9150 49.6355 + 9ALA CB 81 50.3445 49.8930 49.8215 + 9ALA HB1 82 50.3275 49.8660 49.9255 + 9ALA HB2 83 50.3905 49.9910 49.8335 + 9ALA HB3 84 50.4175 49.8240 49.7795 + 9ALA C 85 50.1515 49.7560 49.7385 + 9ALA O 86 50.1725 49.6810 49.6435 + 10ALA N 87 50.0745 49.7240 49.8425 + 10ALA H 88 50.0485 49.7880 49.9155 + 10ALA CA 89 50.0235 49.5890 49.8605 + 10ALA HA 90 50.0995 49.5160 49.8335 + 10ALA CB 91 49.9905 49.5640 50.0075 + 10ALA HB1 92 50.0775 49.5780 50.0705 + 10ALA HB2 93 49.9575 49.4620 50.0275 + 10ALA HB3 94 49.9185 49.6360 50.0465 + 10ALA C 95 49.9095 49.5550 49.7665 + 10ALA O 96 49.9105 49.4510 49.7015 + 11ALA N 97 49.8105 49.6450 49.7595 + 11ALA H 98 49.8065 49.7180 49.8295 + 11ALA CA 99 49.7095 49.6550 49.6555 + 11ALA HA 100 49.6475 49.5650 49.6505 + 11ALA CB 101 49.6035 49.7460 49.7175 + 11ALA HB1 102 49.6145 49.8530 49.7025 + 11ALA HB2 103 49.5945 49.7210 49.8235 + 11ALA HB3 104 49.5075 49.7120 49.6805 + 11ALA C 105 49.7585 49.7010 49.5195 + 11ALA O 106 49.7005 49.7930 49.4615 + 12ALA N 107 49.8685 49.6390 49.4745 + 12ALA H 108 49.8995 49.5710 49.5415 + 12ALA CA 109 49.9325 49.6570 49.3465 + 12ALA HA 110 49.8485 49.6420 49.2785 + 12ALA CB 111 49.9825 49.8000 49.3315 + 12ALA HB1 112 50.0435 49.8080 49.2415 + 12ALA HB2 113 50.0385 49.8250 49.4215 + 12ALA HB3 114 49.9065 49.8760 49.3135 + 12ALA C 115 50.0445 49.5590 49.3135 + 12ALA O 116 50.0295 49.4690 49.2305 + 13ALA N 117 50.1555 49.5660 49.3855 + 13ALA H 118 50.1585 49.6210 49.4705 + 13ALA CA 119 50.2815 49.5020 49.3495 + 13ALA HA 120 50.2625 49.4120 49.2905 + 13ALA CB 121 50.3555 49.6010 49.2605 + 13ALA HB1 122 50.4525 49.5570 49.2345 + 13ALA HB2 123 50.3795 49.6910 49.3165 + 13ALA HB3 124 50.3015 49.6170 49.1675 + 13ALA C 125 50.3525 49.4660 49.4795 + 13ALA O 126 50.4325 49.5470 49.5265 + 14NME N 127 50.3285 49.3450 49.5295 + 14NME H 128 50.2495 49.2930 49.4955 + 14NME CH3 129 50.3935 49.2790 49.6415 + 14NME HH31 130 50.3255 49.3020 49.7235 + 14NME HH32 131 50.4905 49.3260 49.6565 + 14NME HH33 132 50.3955 49.1710 49.6315 + 100.00000 100.00000 100.00000 diff --git a/examples/dmdmd_ala12/topol.top b/examples/dmdmd_ala12/topol.top new file mode 100644 index 0000000..d4909f5 --- /dev/null +++ b/examples/dmdmd_ala12/topol.top @@ -0,0 +1,1224 @@ +; +; File 'topol.top' was generated +; By user: onbekend (0) +; On host: onbekend +; At date: Tue Nov 9 15:09:19 2010 +; +; This is a standalone topology file +; +; It was generated using program: +; pdb2gmx_d - VERSION 4.5.1 +; +; Command line was: +; /home/tribellg/progs/gromacs4.5/bin/pdb2gmx_d -f init_conf.gro -o ala12.gro +; +; Force field was read from the standard Gromacs share directory. +; + +; Include forcefield parameters +#include "amber96.ff/forcefield.itp" + +[ moleculetype ] +; Name nrexcl +Protein 3 + +[ atoms ] +; nr type resnr residue atom cgnr charge mass typeB chargeB massB +; residue 1 ACE rtp ACE q 0.0 + 1 HC 1 ACE HH31 1 0.1123 1.008 ; qtot 0.1123 + 2 CT 1 ACE CH3 2 -0.3662 12.01 ; qtot -0.2539 + 3 HC 1 ACE HH32 3 0.1123 1.008 ; qtot -0.1416 + 4 HC 1 ACE HH33 4 0.1123 1.008 ; qtot -0.0293 + 5 C 1 ACE C 5 0.5972 12.01 ; qtot 0.5679 + 6 O 1 ACE O 6 -0.5679 16 ; qtot 0 +; residue 2 ALA rtp ALA q 0.0 + 7 N 2 ALA N 7 -0.4157 14.01 ; qtot -0.4157 + 8 H 2 ALA H 8 0.2719 1.008 ; qtot -0.1438 + 9 CT 2 ALA CA 9 0.0337 12.01 ; qtot -0.1101 + 10 H1 2 ALA HA 10 0.0823 1.008 ; qtot -0.0278 + 11 CT 2 ALA CB 11 -0.1825 12.01 ; qtot -0.2103 + 12 HC 2 ALA HB1 12 0.0603 1.008 ; qtot -0.15 + 13 HC 2 ALA HB2 13 0.0603 1.008 ; qtot -0.0897 + 14 HC 2 ALA HB3 14 0.0603 1.008 ; qtot -0.0294 + 15 C 2 ALA C 15 0.5973 12.01 ; qtot 0.5679 + 16 O 2 ALA O 16 -0.5679 16 ; qtot 0 +; residue 3 ALA rtp ALA q 0.0 + 17 N 3 ALA N 17 -0.4157 14.01 ; qtot -0.4157 + 18 H 3 ALA H 18 0.2719 1.008 ; qtot -0.1438 + 19 CT 3 ALA CA 19 0.0337 12.01 ; qtot -0.1101 + 20 H1 3 ALA HA 20 0.0823 1.008 ; qtot -0.0278 + 21 CT 3 ALA CB 21 -0.1825 12.01 ; qtot -0.2103 + 22 HC 3 ALA HB1 22 0.0603 1.008 ; qtot -0.15 + 23 HC 3 ALA HB2 23 0.0603 1.008 ; qtot -0.0897 + 24 HC 3 ALA HB3 24 0.0603 1.008 ; qtot -0.0294 + 25 C 3 ALA C 25 0.5973 12.01 ; qtot 0.5679 + 26 O 3 ALA O 26 -0.5679 16 ; qtot 0 +; residue 4 ALA rtp ALA q 0.0 + 27 N 4 ALA N 27 -0.4157 14.01 ; qtot -0.4157 + 28 H 4 ALA H 28 0.2719 1.008 ; qtot -0.1438 + 29 CT 4 ALA CA 29 0.0337 12.01 ; qtot -0.1101 + 30 H1 4 ALA HA 30 0.0823 1.008 ; qtot -0.0278 + 31 CT 4 ALA CB 31 -0.1825 12.01 ; qtot -0.2103 + 32 HC 4 ALA HB1 32 0.0603 1.008 ; qtot -0.15 + 33 HC 4 ALA HB2 33 0.0603 1.008 ; qtot -0.0897 + 34 HC 4 ALA HB3 34 0.0603 1.008 ; qtot -0.0294 + 35 C 4 ALA C 35 0.5973 12.01 ; qtot 0.5679 + 36 O 4 ALA O 36 -0.5679 16 ; qtot 0 +; residue 5 ALA rtp ALA q 0.0 + 37 N 5 ALA N 37 -0.4157 14.01 ; qtot -0.4157 + 38 H 5 ALA H 38 0.2719 1.008 ; qtot -0.1438 + 39 CT 5 ALA CA 39 0.0337 12.01 ; qtot -0.1101 + 40 H1 5 ALA HA 40 0.0823 1.008 ; qtot -0.0278 + 41 CT 5 ALA CB 41 -0.1825 12.01 ; qtot -0.2103 + 42 HC 5 ALA HB1 42 0.0603 1.008 ; qtot -0.15 + 43 HC 5 ALA HB2 43 0.0603 1.008 ; qtot -0.0897 + 44 HC 5 ALA HB3 44 0.0603 1.008 ; qtot -0.0294 + 45 C 5 ALA C 45 0.5973 12.01 ; qtot 0.5679 + 46 O 5 ALA O 46 -0.5679 16 ; qtot 0 +; residue 6 ALA rtp ALA q 0.0 + 47 N 6 ALA N 47 -0.4157 14.01 ; qtot -0.4157 + 48 H 6 ALA H 48 0.2719 1.008 ; qtot -0.1438 + 49 CT 6 ALA CA 49 0.0337 12.01 ; qtot -0.1101 + 50 H1 6 ALA HA 50 0.0823 1.008 ; qtot -0.0278 + 51 CT 6 ALA CB 51 -0.1825 12.01 ; qtot -0.2103 + 52 HC 6 ALA HB1 52 0.0603 1.008 ; qtot -0.15 + 53 HC 6 ALA HB2 53 0.0603 1.008 ; qtot -0.0897 + 54 HC 6 ALA HB3 54 0.0603 1.008 ; qtot -0.0294 + 55 C 6 ALA C 55 0.5973 12.01 ; qtot 0.5679 + 56 O 6 ALA O 56 -0.5679 16 ; qtot 0 +; residue 7 ALA rtp ALA q 0.0 + 57 N 7 ALA N 57 -0.4157 14.01 ; qtot -0.4157 + 58 H 7 ALA H 58 0.2719 1.008 ; qtot -0.1438 + 59 CT 7 ALA CA 59 0.0337 12.01 ; qtot -0.1101 + 60 H1 7 ALA HA 60 0.0823 1.008 ; qtot -0.0278 + 61 CT 7 ALA CB 61 -0.1825 12.01 ; qtot -0.2103 + 62 HC 7 ALA HB1 62 0.0603 1.008 ; qtot -0.15 + 63 HC 7 ALA HB2 63 0.0603 1.008 ; qtot -0.0897 + 64 HC 7 ALA HB3 64 0.0603 1.008 ; qtot -0.0294 + 65 C 7 ALA C 65 0.5973 12.01 ; qtot 0.5679 + 66 O 7 ALA O 66 -0.5679 16 ; qtot 0 +; residue 8 ALA rtp ALA q 0.0 + 67 N 8 ALA N 67 -0.4157 14.01 ; qtot -0.4157 + 68 H 8 ALA H 68 0.2719 1.008 ; qtot -0.1438 + 69 CT 8 ALA CA 69 0.0337 12.01 ; qtot -0.1101 + 70 H1 8 ALA HA 70 0.0823 1.008 ; qtot -0.0278 + 71 CT 8 ALA CB 71 -0.1825 12.01 ; qtot -0.2103 + 72 HC 8 ALA HB1 72 0.0603 1.008 ; qtot -0.15 + 73 HC 8 ALA HB2 73 0.0603 1.008 ; qtot -0.0897 + 74 HC 8 ALA HB3 74 0.0603 1.008 ; qtot -0.0294 + 75 C 8 ALA C 75 0.5973 12.01 ; qtot 0.5679 + 76 O 8 ALA O 76 -0.5679 16 ; qtot 0 +; residue 9 ALA rtp ALA q 0.0 + 77 N 9 ALA N 77 -0.4157 14.01 ; qtot -0.4157 + 78 H 9 ALA H 78 0.2719 1.008 ; qtot -0.1438 + 79 CT 9 ALA CA 79 0.0337 12.01 ; qtot -0.1101 + 80 H1 9 ALA HA 80 0.0823 1.008 ; qtot -0.0278 + 81 CT 9 ALA CB 81 -0.1825 12.01 ; qtot -0.2103 + 82 HC 9 ALA HB1 82 0.0603 1.008 ; qtot -0.15 + 83 HC 9 ALA HB2 83 0.0603 1.008 ; qtot -0.0897 + 84 HC 9 ALA HB3 84 0.0603 1.008 ; qtot -0.0294 + 85 C 9 ALA C 85 0.5973 12.01 ; qtot 0.5679 + 86 O 9 ALA O 86 -0.5679 16 ; qtot 0 +; residue 10 ALA rtp ALA q 0.0 + 87 N 10 ALA N 87 -0.4157 14.01 ; qtot -0.4157 + 88 H 10 ALA H 88 0.2719 1.008 ; qtot -0.1438 + 89 CT 10 ALA CA 89 0.0337 12.01 ; qtot -0.1101 + 90 H1 10 ALA HA 90 0.0823 1.008 ; qtot -0.0278 + 91 CT 10 ALA CB 91 -0.1825 12.01 ; qtot -0.2103 + 92 HC 10 ALA HB1 92 0.0603 1.008 ; qtot -0.15 + 93 HC 10 ALA HB2 93 0.0603 1.008 ; qtot -0.0897 + 94 HC 10 ALA HB3 94 0.0603 1.008 ; qtot -0.0294 + 95 C 10 ALA C 95 0.5973 12.01 ; qtot 0.5679 + 96 O 10 ALA O 96 -0.5679 16 ; qtot 0 +; residue 11 ALA rtp ALA q 0.0 + 97 N 11 ALA N 97 -0.4157 14.01 ; qtot -0.4157 + 98 H 11 ALA H 98 0.2719 1.008 ; qtot -0.1438 + 99 CT 11 ALA CA 99 0.0337 12.01 ; qtot -0.1101 + 100 H1 11 ALA HA 100 0.0823 1.008 ; qtot -0.0278 + 101 CT 11 ALA CB 101 -0.1825 12.01 ; qtot -0.2103 + 102 HC 11 ALA HB1 102 0.0603 1.008 ; qtot -0.15 + 103 HC 11 ALA HB2 103 0.0603 1.008 ; qtot -0.0897 + 104 HC 11 ALA HB3 104 0.0603 1.008 ; qtot -0.0294 + 105 C 11 ALA C 105 0.5973 12.01 ; qtot 0.5679 + 106 O 11 ALA O 106 -0.5679 16 ; qtot 0 +; residue 12 ALA rtp ALA q 0.0 + 107 N 12 ALA N 107 -0.4157 14.01 ; qtot -0.4157 + 108 H 12 ALA H 108 0.2719 1.008 ; qtot -0.1438 + 109 CT 12 ALA CA 109 0.0337 12.01 ; qtot -0.1101 + 110 H1 12 ALA HA 110 0.0823 1.008 ; qtot -0.0278 + 111 CT 12 ALA CB 111 -0.1825 12.01 ; qtot -0.2103 + 112 HC 12 ALA HB1 112 0.0603 1.008 ; qtot -0.15 + 113 HC 12 ALA HB2 113 0.0603 1.008 ; qtot -0.0897 + 114 HC 12 ALA HB3 114 0.0603 1.008 ; qtot -0.0294 + 115 C 12 ALA C 115 0.5973 12.01 ; qtot 0.5679 + 116 O 12 ALA O 116 -0.5679 16 ; qtot 0 +; residue 13 ALA rtp ALA q 0.0 + 117 N 13 ALA N 117 -0.4157 14.01 ; qtot -0.4157 + 118 H 13 ALA H 118 0.2719 1.008 ; qtot -0.1438 + 119 CT 13 ALA CA 119 0.0337 12.01 ; qtot -0.1101 + 120 H1 13 ALA HA 120 0.0823 1.008 ; qtot -0.0278 + 121 CT 13 ALA CB 121 -0.1825 12.01 ; qtot -0.2103 + 122 HC 13 ALA HB1 122 0.0603 1.008 ; qtot -0.15 + 123 HC 13 ALA HB2 123 0.0603 1.008 ; qtot -0.0897 + 124 HC 13 ALA HB3 124 0.0603 1.008 ; qtot -0.0294 + 125 C 13 ALA C 125 0.5973 12.01 ; qtot 0.5679 + 126 O 13 ALA O 126 -0.5679 16 ; qtot 0 +; residue 14 NME rtp NME q 0.0 + 127 N 14 NME N 127 -0.4157 14.01 ; qtot -0.4157 + 128 H 14 NME H 128 0.2719 1.008 ; qtot -0.1438 + 129 CT 14 NME CH3 129 -0.149 12.01 ; qtot -0.2928 + 130 H1 14 NME HH31 130 0.0976 1.008 ; qtot -0.1952 + 131 H1 14 NME HH32 131 0.0976 1.008 ; qtot -0.0976 + 132 H1 14 NME HH33 132 0.0976 1.008 ; qtot 0 + +[ bonds ] +; ai aj funct c0 c1 c2 c3 + 1 2 1 + 2 3 1 + 2 4 1 + 2 5 1 + 5 6 1 + 5 7 1 + 7 8 1 + 7 9 1 + 9 10 1 + 9 11 1 + 9 15 1 + 11 12 1 + 11 13 1 + 11 14 1 + 15 16 1 + 15 17 1 + 17 18 1 + 17 19 1 + 19 20 1 + 19 21 1 + 19 25 1 + 21 22 1 + 21 23 1 + 21 24 1 + 25 26 1 + 25 27 1 + 27 28 1 + 27 29 1 + 29 30 1 + 29 31 1 + 29 35 1 + 31 32 1 + 31 33 1 + 31 34 1 + 35 36 1 + 35 37 1 + 37 38 1 + 37 39 1 + 39 40 1 + 39 41 1 + 39 45 1 + 41 42 1 + 41 43 1 + 41 44 1 + 45 46 1 + 45 47 1 + 47 48 1 + 47 49 1 + 49 50 1 + 49 51 1 + 49 55 1 + 51 52 1 + 51 53 1 + 51 54 1 + 55 56 1 + 55 57 1 + 57 58 1 + 57 59 1 + 59 60 1 + 59 61 1 + 59 65 1 + 61 62 1 + 61 63 1 + 61 64 1 + 65 66 1 + 65 67 1 + 67 68 1 + 67 69 1 + 69 70 1 + 69 71 1 + 69 75 1 + 71 72 1 + 71 73 1 + 71 74 1 + 75 76 1 + 75 77 1 + 77 78 1 + 77 79 1 + 79 80 1 + 79 81 1 + 79 85 1 + 81 82 1 + 81 83 1 + 81 84 1 + 85 86 1 + 85 87 1 + 87 88 1 + 87 89 1 + 89 90 1 + 89 91 1 + 89 95 1 + 91 92 1 + 91 93 1 + 91 94 1 + 95 96 1 + 95 97 1 + 97 98 1 + 97 99 1 + 99 100 1 + 99 101 1 + 99 105 1 + 101 102 1 + 101 103 1 + 101 104 1 + 105 106 1 + 105 107 1 + 107 108 1 + 107 109 1 + 109 110 1 + 109 111 1 + 109 115 1 + 111 112 1 + 111 113 1 + 111 114 1 + 115 116 1 + 115 117 1 + 117 118 1 + 117 119 1 + 119 120 1 + 119 121 1 + 119 125 1 + 121 122 1 + 121 123 1 + 121 124 1 + 125 126 1 + 125 127 1 + 127 128 1 + 127 129 1 + 129 130 1 + 129 131 1 + 129 132 1 + +[ pairs ] +; ai aj funct c0 c1 c2 c3 + 1 6 1 + 1 7 1 + 2 8 1 + 2 9 1 + 3 6 1 + 3 7 1 + 4 6 1 + 4 7 1 + 5 10 1 + 5 11 1 + 5 15 1 + 6 8 1 + 6 9 1 + 7 12 1 + 7 13 1 + 7 14 1 + 7 16 1 + 7 17 1 + 8 10 1 + 8 11 1 + 8 15 1 + 9 18 1 + 9 19 1 + 10 12 1 + 10 13 1 + 10 14 1 + 10 16 1 + 10 17 1 + 11 16 1 + 11 17 1 + 12 15 1 + 13 15 1 + 14 15 1 + 15 20 1 + 15 21 1 + 15 25 1 + 16 18 1 + 16 19 1 + 17 22 1 + 17 23 1 + 17 24 1 + 17 26 1 + 17 27 1 + 18 20 1 + 18 21 1 + 18 25 1 + 19 28 1 + 19 29 1 + 20 22 1 + 20 23 1 + 20 24 1 + 20 26 1 + 20 27 1 + 21 26 1 + 21 27 1 + 22 25 1 + 23 25 1 + 24 25 1 + 25 30 1 + 25 31 1 + 25 35 1 + 26 28 1 + 26 29 1 + 27 32 1 + 27 33 1 + 27 34 1 + 27 36 1 + 27 37 1 + 28 30 1 + 28 31 1 + 28 35 1 + 29 38 1 + 29 39 1 + 30 32 1 + 30 33 1 + 30 34 1 + 30 36 1 + 30 37 1 + 31 36 1 + 31 37 1 + 32 35 1 + 33 35 1 + 34 35 1 + 35 40 1 + 35 41 1 + 35 45 1 + 36 38 1 + 36 39 1 + 37 42 1 + 37 43 1 + 37 44 1 + 37 46 1 + 37 47 1 + 38 40 1 + 38 41 1 + 38 45 1 + 39 48 1 + 39 49 1 + 40 42 1 + 40 43 1 + 40 44 1 + 40 46 1 + 40 47 1 + 41 46 1 + 41 47 1 + 42 45 1 + 43 45 1 + 44 45 1 + 45 50 1 + 45 51 1 + 45 55 1 + 46 48 1 + 46 49 1 + 47 52 1 + 47 53 1 + 47 54 1 + 47 56 1 + 47 57 1 + 48 50 1 + 48 51 1 + 48 55 1 + 49 58 1 + 49 59 1 + 50 52 1 + 50 53 1 + 50 54 1 + 50 56 1 + 50 57 1 + 51 56 1 + 51 57 1 + 52 55 1 + 53 55 1 + 54 55 1 + 55 60 1 + 55 61 1 + 55 65 1 + 56 58 1 + 56 59 1 + 57 62 1 + 57 63 1 + 57 64 1 + 57 66 1 + 57 67 1 + 58 60 1 + 58 61 1 + 58 65 1 + 59 68 1 + 59 69 1 + 60 62 1 + 60 63 1 + 60 64 1 + 60 66 1 + 60 67 1 + 61 66 1 + 61 67 1 + 62 65 1 + 63 65 1 + 64 65 1 + 65 70 1 + 65 71 1 + 65 75 1 + 66 68 1 + 66 69 1 + 67 72 1 + 67 73 1 + 67 74 1 + 67 76 1 + 67 77 1 + 68 70 1 + 68 71 1 + 68 75 1 + 69 78 1 + 69 79 1 + 70 72 1 + 70 73 1 + 70 74 1 + 70 76 1 + 70 77 1 + 71 76 1 + 71 77 1 + 72 75 1 + 73 75 1 + 74 75 1 + 75 80 1 + 75 81 1 + 75 85 1 + 76 78 1 + 76 79 1 + 77 82 1 + 77 83 1 + 77 84 1 + 77 86 1 + 77 87 1 + 78 80 1 + 78 81 1 + 78 85 1 + 79 88 1 + 79 89 1 + 80 82 1 + 80 83 1 + 80 84 1 + 80 86 1 + 80 87 1 + 81 86 1 + 81 87 1 + 82 85 1 + 83 85 1 + 84 85 1 + 85 90 1 + 85 91 1 + 85 95 1 + 86 88 1 + 86 89 1 + 87 92 1 + 87 93 1 + 87 94 1 + 87 96 1 + 87 97 1 + 88 90 1 + 88 91 1 + 88 95 1 + 89 98 1 + 89 99 1 + 90 92 1 + 90 93 1 + 90 94 1 + 90 96 1 + 90 97 1 + 91 96 1 + 91 97 1 + 92 95 1 + 93 95 1 + 94 95 1 + 95 100 1 + 95 101 1 + 95 105 1 + 96 98 1 + 96 99 1 + 97 102 1 + 97 103 1 + 97 104 1 + 97 106 1 + 97 107 1 + 98 100 1 + 98 101 1 + 98 105 1 + 99 108 1 + 99 109 1 + 100 102 1 + 100 103 1 + 100 104 1 + 100 106 1 + 100 107 1 + 101 106 1 + 101 107 1 + 102 105 1 + 103 105 1 + 104 105 1 + 105 110 1 + 105 111 1 + 105 115 1 + 106 108 1 + 106 109 1 + 107 112 1 + 107 113 1 + 107 114 1 + 107 116 1 + 107 117 1 + 108 110 1 + 108 111 1 + 108 115 1 + 109 118 1 + 109 119 1 + 110 112 1 + 110 113 1 + 110 114 1 + 110 116 1 + 110 117 1 + 111 116 1 + 111 117 1 + 112 115 1 + 113 115 1 + 114 115 1 + 115 120 1 + 115 121 1 + 115 125 1 + 116 118 1 + 116 119 1 + 117 122 1 + 117 123 1 + 117 124 1 + 117 126 1 + 117 127 1 + 118 120 1 + 118 121 1 + 118 125 1 + 119 128 1 + 119 129 1 + 120 122 1 + 120 123 1 + 120 124 1 + 120 126 1 + 120 127 1 + 121 126 1 + 121 127 1 + 122 125 1 + 123 125 1 + 124 125 1 + 125 130 1 + 125 131 1 + 125 132 1 + 126 128 1 + 126 129 1 + 128 130 1 + 128 131 1 + 128 132 1 + +[ angles ] +; ai aj ak funct c0 c1 c2 c3 + 1 2 3 1 + 1 2 4 1 + 1 2 5 1 + 3 2 4 1 + 3 2 5 1 + 4 2 5 1 + 2 5 6 1 + 2 5 7 1 + 6 5 7 1 + 5 7 8 1 + 5 7 9 1 + 8 7 9 1 + 7 9 10 1 + 7 9 11 1 + 7 9 15 1 + 10 9 11 1 + 10 9 15 1 + 11 9 15 1 + 9 11 12 1 + 9 11 13 1 + 9 11 14 1 + 12 11 13 1 + 12 11 14 1 + 13 11 14 1 + 9 15 16 1 + 9 15 17 1 + 16 15 17 1 + 15 17 18 1 + 15 17 19 1 + 18 17 19 1 + 17 19 20 1 + 17 19 21 1 + 17 19 25 1 + 20 19 21 1 + 20 19 25 1 + 21 19 25 1 + 19 21 22 1 + 19 21 23 1 + 19 21 24 1 + 22 21 23 1 + 22 21 24 1 + 23 21 24 1 + 19 25 26 1 + 19 25 27 1 + 26 25 27 1 + 25 27 28 1 + 25 27 29 1 + 28 27 29 1 + 27 29 30 1 + 27 29 31 1 + 27 29 35 1 + 30 29 31 1 + 30 29 35 1 + 31 29 35 1 + 29 31 32 1 + 29 31 33 1 + 29 31 34 1 + 32 31 33 1 + 32 31 34 1 + 33 31 34 1 + 29 35 36 1 + 29 35 37 1 + 36 35 37 1 + 35 37 38 1 + 35 37 39 1 + 38 37 39 1 + 37 39 40 1 + 37 39 41 1 + 37 39 45 1 + 40 39 41 1 + 40 39 45 1 + 41 39 45 1 + 39 41 42 1 + 39 41 43 1 + 39 41 44 1 + 42 41 43 1 + 42 41 44 1 + 43 41 44 1 + 39 45 46 1 + 39 45 47 1 + 46 45 47 1 + 45 47 48 1 + 45 47 49 1 + 48 47 49 1 + 47 49 50 1 + 47 49 51 1 + 47 49 55 1 + 50 49 51 1 + 50 49 55 1 + 51 49 55 1 + 49 51 52 1 + 49 51 53 1 + 49 51 54 1 + 52 51 53 1 + 52 51 54 1 + 53 51 54 1 + 49 55 56 1 + 49 55 57 1 + 56 55 57 1 + 55 57 58 1 + 55 57 59 1 + 58 57 59 1 + 57 59 60 1 + 57 59 61 1 + 57 59 65 1 + 60 59 61 1 + 60 59 65 1 + 61 59 65 1 + 59 61 62 1 + 59 61 63 1 + 59 61 64 1 + 62 61 63 1 + 62 61 64 1 + 63 61 64 1 + 59 65 66 1 + 59 65 67 1 + 66 65 67 1 + 65 67 68 1 + 65 67 69 1 + 68 67 69 1 + 67 69 70 1 + 67 69 71 1 + 67 69 75 1 + 70 69 71 1 + 70 69 75 1 + 71 69 75 1 + 69 71 72 1 + 69 71 73 1 + 69 71 74 1 + 72 71 73 1 + 72 71 74 1 + 73 71 74 1 + 69 75 76 1 + 69 75 77 1 + 76 75 77 1 + 75 77 78 1 + 75 77 79 1 + 78 77 79 1 + 77 79 80 1 + 77 79 81 1 + 77 79 85 1 + 80 79 81 1 + 80 79 85 1 + 81 79 85 1 + 79 81 82 1 + 79 81 83 1 + 79 81 84 1 + 82 81 83 1 + 82 81 84 1 + 83 81 84 1 + 79 85 86 1 + 79 85 87 1 + 86 85 87 1 + 85 87 88 1 + 85 87 89 1 + 88 87 89 1 + 87 89 90 1 + 87 89 91 1 + 87 89 95 1 + 90 89 91 1 + 90 89 95 1 + 91 89 95 1 + 89 91 92 1 + 89 91 93 1 + 89 91 94 1 + 92 91 93 1 + 92 91 94 1 + 93 91 94 1 + 89 95 96 1 + 89 95 97 1 + 96 95 97 1 + 95 97 98 1 + 95 97 99 1 + 98 97 99 1 + 97 99 100 1 + 97 99 101 1 + 97 99 105 1 + 100 99 101 1 + 100 99 105 1 + 101 99 105 1 + 99 101 102 1 + 99 101 103 1 + 99 101 104 1 + 102 101 103 1 + 102 101 104 1 + 103 101 104 1 + 99 105 106 1 + 99 105 107 1 + 106 105 107 1 + 105 107 108 1 + 105 107 109 1 + 108 107 109 1 + 107 109 110 1 + 107 109 111 1 + 107 109 115 1 + 110 109 111 1 + 110 109 115 1 + 111 109 115 1 + 109 111 112 1 + 109 111 113 1 + 109 111 114 1 + 112 111 113 1 + 112 111 114 1 + 113 111 114 1 + 109 115 116 1 + 109 115 117 1 + 116 115 117 1 + 115 117 118 1 + 115 117 119 1 + 118 117 119 1 + 117 119 120 1 + 117 119 121 1 + 117 119 125 1 + 120 119 121 1 + 120 119 125 1 + 121 119 125 1 + 119 121 122 1 + 119 121 123 1 + 119 121 124 1 + 122 121 123 1 + 122 121 124 1 + 123 121 124 1 + 119 125 126 1 + 119 125 127 1 + 126 125 127 1 + 125 127 128 1 + 125 127 129 1 + 128 127 129 1 + 127 129 130 1 + 127 129 131 1 + 127 129 132 1 + 130 129 131 1 + 130 129 132 1 + 131 129 132 1 + +[ dihedrals ] +; ai aj ak al funct c0 c1 c2 c3 c4 c5 + 1 2 5 6 9 + 1 2 5 7 9 + 3 2 5 6 9 + 3 2 5 7 9 + 4 2 5 6 9 + 4 2 5 7 9 + 2 5 7 8 9 + 2 5 7 9 9 + 6 5 7 8 9 + 6 5 7 9 9 + 5 7 9 10 9 + 5 7 9 11 9 + 5 7 9 15 9 + 8 7 9 10 9 + 8 7 9 11 9 + 8 7 9 15 9 + 7 9 11 12 9 + 7 9 11 13 9 + 7 9 11 14 9 + 10 9 11 12 9 + 10 9 11 13 9 + 10 9 11 14 9 + 15 9 11 12 9 + 15 9 11 13 9 + 15 9 11 14 9 + 7 9 15 16 9 + 7 9 15 17 9 + 10 9 15 16 9 + 10 9 15 17 9 + 11 9 15 16 9 + 11 9 15 17 9 + 9 15 17 18 9 + 9 15 17 19 9 + 16 15 17 18 9 + 16 15 17 19 9 + 15 17 19 20 9 + 15 17 19 21 9 + 15 17 19 25 9 + 18 17 19 20 9 + 18 17 19 21 9 + 18 17 19 25 9 + 17 19 21 22 9 + 17 19 21 23 9 + 17 19 21 24 9 + 20 19 21 22 9 + 20 19 21 23 9 + 20 19 21 24 9 + 25 19 21 22 9 + 25 19 21 23 9 + 25 19 21 24 9 + 17 19 25 26 9 + 17 19 25 27 9 + 20 19 25 26 9 + 20 19 25 27 9 + 21 19 25 26 9 + 21 19 25 27 9 + 19 25 27 28 9 + 19 25 27 29 9 + 26 25 27 28 9 + 26 25 27 29 9 + 25 27 29 30 9 + 25 27 29 31 9 + 25 27 29 35 9 + 28 27 29 30 9 + 28 27 29 31 9 + 28 27 29 35 9 + 27 29 31 32 9 + 27 29 31 33 9 + 27 29 31 34 9 + 30 29 31 32 9 + 30 29 31 33 9 + 30 29 31 34 9 + 35 29 31 32 9 + 35 29 31 33 9 + 35 29 31 34 9 + 27 29 35 36 9 + 27 29 35 37 9 + 30 29 35 36 9 + 30 29 35 37 9 + 31 29 35 36 9 + 31 29 35 37 9 + 29 35 37 38 9 + 29 35 37 39 9 + 36 35 37 38 9 + 36 35 37 39 9 + 35 37 39 40 9 + 35 37 39 41 9 + 35 37 39 45 9 + 38 37 39 40 9 + 38 37 39 41 9 + 38 37 39 45 9 + 37 39 41 42 9 + 37 39 41 43 9 + 37 39 41 44 9 + 40 39 41 42 9 + 40 39 41 43 9 + 40 39 41 44 9 + 45 39 41 42 9 + 45 39 41 43 9 + 45 39 41 44 9 + 37 39 45 46 9 + 37 39 45 47 9 + 40 39 45 46 9 + 40 39 45 47 9 + 41 39 45 46 9 + 41 39 45 47 9 + 39 45 47 48 9 + 39 45 47 49 9 + 46 45 47 48 9 + 46 45 47 49 9 + 45 47 49 50 9 + 45 47 49 51 9 + 45 47 49 55 9 + 48 47 49 50 9 + 48 47 49 51 9 + 48 47 49 55 9 + 47 49 51 52 9 + 47 49 51 53 9 + 47 49 51 54 9 + 50 49 51 52 9 + 50 49 51 53 9 + 50 49 51 54 9 + 55 49 51 52 9 + 55 49 51 53 9 + 55 49 51 54 9 + 47 49 55 56 9 + 47 49 55 57 9 + 50 49 55 56 9 + 50 49 55 57 9 + 51 49 55 56 9 + 51 49 55 57 9 + 49 55 57 58 9 + 49 55 57 59 9 + 56 55 57 58 9 + 56 55 57 59 9 + 55 57 59 60 9 + 55 57 59 61 9 + 55 57 59 65 9 + 58 57 59 60 9 + 58 57 59 61 9 + 58 57 59 65 9 + 57 59 61 62 9 + 57 59 61 63 9 + 57 59 61 64 9 + 60 59 61 62 9 + 60 59 61 63 9 + 60 59 61 64 9 + 65 59 61 62 9 + 65 59 61 63 9 + 65 59 61 64 9 + 57 59 65 66 9 + 57 59 65 67 9 + 60 59 65 66 9 + 60 59 65 67 9 + 61 59 65 66 9 + 61 59 65 67 9 + 59 65 67 68 9 + 59 65 67 69 9 + 66 65 67 68 9 + 66 65 67 69 9 + 65 67 69 70 9 + 65 67 69 71 9 + 65 67 69 75 9 + 68 67 69 70 9 + 68 67 69 71 9 + 68 67 69 75 9 + 67 69 71 72 9 + 67 69 71 73 9 + 67 69 71 74 9 + 70 69 71 72 9 + 70 69 71 73 9 + 70 69 71 74 9 + 75 69 71 72 9 + 75 69 71 73 9 + 75 69 71 74 9 + 67 69 75 76 9 + 67 69 75 77 9 + 70 69 75 76 9 + 70 69 75 77 9 + 71 69 75 76 9 + 71 69 75 77 9 + 69 75 77 78 9 + 69 75 77 79 9 + 76 75 77 78 9 + 76 75 77 79 9 + 75 77 79 80 9 + 75 77 79 81 9 + 75 77 79 85 9 + 78 77 79 80 9 + 78 77 79 81 9 + 78 77 79 85 9 + 77 79 81 82 9 + 77 79 81 83 9 + 77 79 81 84 9 + 80 79 81 82 9 + 80 79 81 83 9 + 80 79 81 84 9 + 85 79 81 82 9 + 85 79 81 83 9 + 85 79 81 84 9 + 77 79 85 86 9 + 77 79 85 87 9 + 80 79 85 86 9 + 80 79 85 87 9 + 81 79 85 86 9 + 81 79 85 87 9 + 79 85 87 88 9 + 79 85 87 89 9 + 86 85 87 88 9 + 86 85 87 89 9 + 85 87 89 90 9 + 85 87 89 91 9 + 85 87 89 95 9 + 88 87 89 90 9 + 88 87 89 91 9 + 88 87 89 95 9 + 87 89 91 92 9 + 87 89 91 93 9 + 87 89 91 94 9 + 90 89 91 92 9 + 90 89 91 93 9 + 90 89 91 94 9 + 95 89 91 92 9 + 95 89 91 93 9 + 95 89 91 94 9 + 87 89 95 96 9 + 87 89 95 97 9 + 90 89 95 96 9 + 90 89 95 97 9 + 91 89 95 96 9 + 91 89 95 97 9 + 89 95 97 98 9 + 89 95 97 99 9 + 96 95 97 98 9 + 96 95 97 99 9 + 95 97 99 100 9 + 95 97 99 101 9 + 95 97 99 105 9 + 98 97 99 100 9 + 98 97 99 101 9 + 98 97 99 105 9 + 97 99 101 102 9 + 97 99 101 103 9 + 97 99 101 104 9 + 100 99 101 102 9 + 100 99 101 103 9 + 100 99 101 104 9 + 105 99 101 102 9 + 105 99 101 103 9 + 105 99 101 104 9 + 97 99 105 106 9 + 97 99 105 107 9 + 100 99 105 106 9 + 100 99 105 107 9 + 101 99 105 106 9 + 101 99 105 107 9 + 99 105 107 108 9 + 99 105 107 109 9 + 106 105 107 108 9 + 106 105 107 109 9 + 105 107 109 110 9 + 105 107 109 111 9 + 105 107 109 115 9 + 108 107 109 110 9 + 108 107 109 111 9 + 108 107 109 115 9 + 107 109 111 112 9 + 107 109 111 113 9 + 107 109 111 114 9 + 110 109 111 112 9 + 110 109 111 113 9 + 110 109 111 114 9 + 115 109 111 112 9 + 115 109 111 113 9 + 115 109 111 114 9 + 107 109 115 116 9 + 107 109 115 117 9 + 110 109 115 116 9 + 110 109 115 117 9 + 111 109 115 116 9 + 111 109 115 117 9 + 109 115 117 118 9 + 109 115 117 119 9 + 116 115 117 118 9 + 116 115 117 119 9 + 115 117 119 120 9 + 115 117 119 121 9 + 115 117 119 125 9 + 118 117 119 120 9 + 118 117 119 121 9 + 118 117 119 125 9 + 117 119 121 122 9 + 117 119 121 123 9 + 117 119 121 124 9 + 120 119 121 122 9 + 120 119 121 123 9 + 120 119 121 124 9 + 125 119 121 122 9 + 125 119 121 123 9 + 125 119 121 124 9 + 117 119 125 126 9 + 117 119 125 127 9 + 120 119 125 126 9 + 120 119 125 127 9 + 121 119 125 126 9 + 121 119 125 127 9 + 119 125 127 128 9 + 119 125 127 129 9 + 126 125 127 128 9 + 126 125 127 129 9 + 125 127 129 130 9 + 125 127 129 131 9 + 125 127 129 132 9 + 128 127 129 130 9 + 128 127 129 131 9 + 128 127 129 132 9 + +[ dihedrals ] +; ai aj ak al funct c0 c1 c2 c3 + 2 7 5 6 4 + 5 9 7 8 4 + 9 17 15 16 4 + 15 19 17 18 4 + 19 27 25 26 4 + 25 29 27 28 4 + 29 37 35 36 4 + 35 39 37 38 4 + 39 47 45 46 4 + 45 49 47 48 4 + 49 57 55 56 4 + 55 59 57 58 4 + 59 67 65 66 4 + 65 69 67 68 4 + 69 77 75 76 4 + 75 79 77 78 4 + 79 87 85 86 4 + 85 89 87 88 4 + 89 97 95 96 4 + 95 99 97 98 4 + 99 107 105 106 4 + 105 109 107 108 4 + 109 117 115 116 4 + 115 119 117 118 4 + 119 127 125 126 4 + 125 129 127 128 4 + +; Include Position restraint file +#ifdef POSRES +#include "posre.itp" +#endif + +[ system ] +; Name +Protein t= 0.00000 + +[ molecules ] +; Compound #mols +Protein 1 + diff --git a/examples/lsdmap/aladip.gro b/examples/lsdmap/aladip.gro new file mode 100644 index 0000000..dd46e8f --- /dev/null +++ b/examples/lsdmap/aladip.gro @@ -0,0 +1,25 @@ +Protein t= 0.00000 + 22 + 1ACE HH31 1 22.686 28.211 24.555 -3.0460 -2.0523 1.2379 + 1ACE CH3 2 22.692 28.156 24.461 -0.0973 0.1526 0.0267 + 1ACE HH32 3 22.592 28.118 24.439 0.0191 -0.7591 0.9995 + 1ACE HH33 4 22.771 28.082 24.475 -0.2346 -0.5150 -2.5520 + 1ACE C 5 22.724 28.239 24.336 0.1755 -0.1812 -0.1583 + 1ACE O 6 22.693 28.208 24.219 -0.0496 -0.6332 0.2270 + 2ALA N 7 22.769 28.358 24.371 0.1755 0.2079 -0.1678 + 2ALA H 8 22.803 28.381 24.463 0.4807 1.9054 -0.6790 + 2ALA CA 9 22.806 28.461 24.261 -1.0071 -0.1678 -0.3738 + 2ALA HA 10 22.734 28.464 24.180 1.8101 -0.3033 -2.9411 + 2ALA CB 11 22.816 28.599 24.330 0.4349 -0.2708 0.1755 + 2ALA HB1 12 22.853 28.666 24.252 1.2798 -0.8831 0.0343 + 2ALA HB2 13 22.879 28.607 24.419 1.8120 -2.1610 -0.6065 + 2ALA HB3 14 22.717 28.631 24.364 0.0172 0.4578 -1.6441 + 2ALA C 15 22.937 28.426 24.190 0.8259 0.0610 0.0954 + 2ALA O 16 23.047 28.481 24.205 -0.0362 0.4139 -0.2823 + 3NME N 17 22.922 28.329 24.095 -0.1507 0.0935 0.6657 + 3NME H 18 22.837 28.274 24.094 -1.8463 2.6531 -0.3357 + 3NME CH3 19 23.028 28.293 23.995 -0.4406 -0.0515 -0.3319 + 3NME HH31 20 23.051 28.378 23.932 2.2793 -0.2975 0.2804 + 3NME HH32 21 23.121 28.264 24.043 -0.5951 0.2403 0.1507 + 3NME HH33 22 22.990 28.219 23.924 1.1482 -0.8888 -0.3166 + 50.00000 50.00000 50.00000 diff --git a/examples/lsdmap/dihedral.sh b/examples/lsdmap/dihedral.sh deleted file mode 100755 index 0594f65..0000000 --- a/examples/lsdmap/dihedral.sh +++ /dev/null @@ -1,11 +0,0 @@ -# example of how to use LSDMap with dihedral metric using .xvg files - -set -e - -sed -i 's/metric=.*/metric=dihedral/g' config.ini -sed -i 's/status=.*/status=constant/g' config.ini -sed -i 's/epsilon=.*/epsilon=0.15/g' config.ini - -# run LSDMap with all .xvg files -# all angles in .xvg files should be given in radians -lsdmap -f config.ini -c xvgfiles/*.xvg diff --git a/lsdmap/lsdm.py b/lsdmap/lsdm.py index 415a0f7..2731d89 100644 --- a/lsdmap/lsdm.py +++ b/lsdmap/lsdm.py @@ -7,6 +7,8 @@ import random import logging import gc +from lsdmap.rw import x2h +#from MDPlus.core import cofasu from lsdmap.rw import reader from lsdmap.rw import coord_reader @@ -28,25 +30,20 @@ def initialize(self, comm, config, args): filename = args.struct_file[0] self.struct_filename = filename - self.npoints,self.natoms = coord_reader.get_nframes_natoms(filename) - - if coord_reader.supports_parallel_reading(filename): - # read coordinates in parallel - self.idxs_thread, self.npoints_per_thread, self.offsets_per_thread = p_index.get_idxs_thread(comm, self.npoints) - coords_thread = coord_reader.get_coordinates(filename, idxs=self.idxs_thread) - coords_ravel = coords_thread.ravel() - ravel_lengths, ravel_offsets = p_index.get_ravel_offsets(self.npoints_per_thread,self.natoms) - coordstemp = np.zeros(self.npoints*3*self.natoms, dtype='float') - start = MPI.Wtime() - comm.Allgatherv(coords_ravel, (coordstemp, ravel_lengths, ravel_offsets, MPI.DOUBLE)) - self.coords = coordstemp.reshape((self.npoints,3,self.natoms)) + + if rank == 0: + f = x2h.Fasu(args.topfile, args.struct_file, selection=args.selection) + c = x2h.Cofasu(f) + self.coords = np.array(c.x, dtype=np.double) * 0.1 + self.coords = np.swapaxes(self.coords, 1, 2) else: - # serial reading - if rank == 0: - self.coords = coord_reader.get_coordinates(filename) - else: - self.coords = np.zeros((self.npoints,3,self.natoms),dtype=np.double) - comm.Bcast(self.coords, root=0) + self.coords = None + self.coords = comm.bcast(self.coords, root=0) + + print rank, self.coords.shape + self.npoints = self.coords.shape[0] + self.natoms = self.coords.shape[2] + self.idxs_thread, self.npoints_per_thread, self.offsets_per_thread = p_index.get_idxs_thread(comm, self.npoints) logging.info('input coordinates loaded') @@ -54,15 +51,12 @@ def initialize(self, comm, config, args): self.initialize_weights() self.initialize_metric() - self.neigs = 10 - - def initialize_local_scale(self): config = self.config args = self.args - known_status = ['constant', 'kneighbor', 'user', 'kneighbor_mean'] + known_status = ['constant', 'kneighbor', 'user', 'kneighbor_mean', 'kneighbor_iw'] _mapped = {'const': 'constant', 'cst': 'constant', 'mean-kneighbor': 'mean_kneighbor'} if args.epsfile is None: @@ -71,7 +65,7 @@ def initialize_local_scale(self): status = _mapped[status] if not status in known_status: raise ValueError("local scale status should be one of "+ ', '.join(known_status)) - if status in ['kneighbor', 'kneighbor_mean']: + if status in ['kneighbor', 'kneighbor_mean', 'kneighbor_iw']: value = None self.k = config.getint('LOCALSCALE', 'k') if status == 'constant': @@ -110,7 +104,16 @@ def initialize_metric(self): config = self.config self.metric = config.get('LSDMAP','metric') - + if config.has_option('LSDMAP','weight_method'): + self.weight_method=config.get('LSDMAP','weight_method') + else: + self.weight_method='standard' + + if config.has_option('LSDMAP','n_eg'): + self.neigs = config.getint('LSDMAP','n_eg') + else: + self.neigs = 10 + self.metric_prms = {} for prm in _known_prms: try: @@ -126,13 +129,16 @@ def create_arg_parser(self): parser.add_argument("-f", type=str, dest="config_file", - required=True, help='Configuration file (input): ini') + parser.add_argument("-t", + type=str, + dest="topfile", + help='Topology file (input): gro, pdb') + parser.add_argument("-c", type=str, dest="struct_file", - required=True, nargs='*', help = 'Structure file (input): gro, xvg') @@ -142,6 +148,12 @@ def create_arg_parser(self): dest="output_file", help='Filename to save pickled LSDMap object (output, opt.): p') + parser.add_argument("-s", + type=str, + dest="selection", + default="all", + help="Atoms selection for analysis (input, opt.)") + parser.add_argument("-d", type=str, dest="dmfile", @@ -178,16 +190,19 @@ def create_arg_parser(self): type=float, dest="nneighbors_cutoff", help="Only the indices of neighbors closer than a distance of nneighbors_cutoff are stored in .nn file; should be used with option -n") - + + parser.add_argument("-V", "--version", action="store_true", default=False, help="display verison and exit") + return parser - def compute_kernel(self, comm, npoints_thread, distance_matrix_thread, weights_thread, epsilon_thread): + def compute_kernel(self, comm, npoints_thread, distance_matrix_thread, weights_thread, epsilon_thread,weight_method='standard'): # for a detailed description of the following operations, see the paper: # Determination of reaction coordinates via locally scaled diffusion map # Mary A. Rohrdanz, Wenwei Zheng, Mauro Maggioni, and Cecilia Clementi # The Journal of Chemical Physics 134, 124116 (2011) + if weight_method=='standard': p_vector_thread = np.zeros(npoints_thread, dtype='float') d_vector_thread = np.zeros(npoints_thread, dtype='float') @@ -195,9 +210,11 @@ def compute_kernel(self, comm, npoints_thread, distance_matrix_thread, weights_t kernel = np.sqrt((weights_thread[:, np.newaxis]).dot(self.weights[np.newaxis])) * \ np.exp(-distance_matrix_thread**2/(2*epsilon_thread[:, np.newaxis].dot(self.epsilon[np.newaxis]))) + p_vector_thread = np.sum(kernel, axis=1) p_vector = np.hstack(comm.allgather(p_vector_thread)) # Eq. (6) self.p_vector = p_vector + #print kernel.shape, p_vector_thread.shape, weights_thread.shape, self.weights.shape kernel /= np.sqrt(p_vector_thread[:,np.newaxis].dot(p_vector[np.newaxis])) # Eq. (7) d_vector_thread = np.sum(kernel, axis=1) @@ -205,8 +222,39 @@ def compute_kernel(self, comm, npoints_thread, distance_matrix_thread, weights_t self.d_vector = d_vector kernel /= np.sqrt(d_vector_thread[:,np.newaxis].dot(d_vector[np.newaxis])) # Eq (8) (slightly modified) + else: + p_vector_thread = np.zeros(npoints_thread, dtype='float') + d_vector_thread = np.zeros(npoints_thread, dtype='float') + + # compute LSDMap kernel, Eq. (5) of the above paper + + kernel = np.exp(-distance_matrix_thread**2/(2*epsilon_thread[:, np.newaxis].dot(self.epsilon[np.newaxis]))) + + for i in range(npoints_thread): + p_vector_thread[i]= np.dot(kernel[i,:], self.weights) + + #p_vector_thread = np.sum(kernel, axis=1) + p_vector = np.hstack(comm.allgather(p_vector_thread)) # Eq. (6) + self.p_vector = p_vector + #print "new method" + #print kernel.shape, p_vector_thread.shape, weights_thread.shape, self.weights.shape - return kernel + + kernel /= np.sqrt(p_vector_thread[:,np.newaxis].dot(p_vector[np.newaxis])) # Eq. (7) + #d_vector_thread = np.sum(kernel, axis=1) + + for i in range(npoints_thread): + d_vector_thread[i]= np.dot(kernel[i,:], self.weights) + + d_vector = np.hstack(comm.allgather(d_vector_thread)) # Compute D given between Eqs. (7) and (8) + self.d_vector = d_vector + + for i in range(npoints_thread): + kernel[i,:]= kernel[i,:]*self.weights + + kernel /= np.sqrt(d_vector_thread[:,np.newaxis].dot(d_vector[np.newaxis])) # Eq (8) (slightly modified) + + return kernel def save(self, config, args): @@ -221,7 +269,15 @@ def save(self, config, args): path, ext = os.path.splitext(struct_filename) np.savetxt(path + '.eg', np.fliplr(self.eigs[np.newaxis]), fmt='%9.6f') + logging.info("saved .eg file") np.savetxt(path + '.ev', np.fliplr(self.evs), fmt='%.18e') + logging.info("saved .ev file") + np.savetxt(path + '.eps', np.fliplr(self.epsilon[np.newaxis]), fmt='%9.6f') + logging.info("saved .eps file") + if config.has_option('LSDMAP','print_kernel'): + if config.get('LSDMAP','print_kernel')=='true': + np.savetxt(path + '.kernel', self.kernel, fmt='%.18e') + logging.info("saved .kernel file") #np.save(path + '_eg.npy', np.fliplr(self.eigs[np.newaxis])) #np.save(path + '_ev.npy', np.fliplr(self.evs)) @@ -232,9 +288,10 @@ def save(self, config, args): return else: lsdmap_filename = args.output_file + logging.info("checked args.output_file") with open(lsdmap_filename, "w") as file: pickle.dump(self, file) - + logging.info("pickle dumped") def save_nneighbors(self, comm, args, neighbor_matrix, idx_neighbor_matrix, epsilon_thread): @@ -326,7 +383,17 @@ def run(self): parser = self.create_arg_parser() args = parser.parse_args() # set argument parser - + + if args.version: # Print version and exit + if rank == 0: + print "2.4" + return + else: + if args.config_file == None: + raise IOError("lsdmap option -f is required") + if args.struct_file == None: + raise IOError("lsdmap option -c is required") + config = ConfigParser.SafeConfigParser() config.read(args.config_file) # set config file parser @@ -362,13 +429,16 @@ def run(self): logging.info("distance matrix loaded") # compute kth neighbor local scales if needed - if self.status_epsilon in ['kneighbor', 'kneighbor_mean']: + if self.status_epsilon in ['kneighbor', 'kneighbor_mean', 'kneighbor_iw']: #epsilon_thread = [] epsilon_threadv = np.zeros(npoints_thread,dtype='float') for idx, line in enumerate(idx_neighbor_matrix_thread): cum_weight = 0 for jdx in line[1:]: - cum_weight += self.weights[jdx] + if self.status_epsilon == 'kneighbor_iw': + cum_weight += 1 + else: + cum_weight += self.weights[jdx] if cum_weight >= self.k: break #epsilon_thread.append(distance_matrix_thread[idx,jdx]) @@ -382,12 +452,13 @@ def run(self): self.epsilon = mean_value_epsilon * np.ones(self.npoints) # and set it as the new constant local scale logging.info("kneighbor local scales computed") - + epsilon_thread = np.array([self.epsilon[idx] for idx in self.idxs_thread]) # compute kernel - kernel = self.compute_kernel(comm, npoints_thread, distance_matrix_thread, weights_thread, epsilon_thread) + kernel = self.compute_kernel(comm, npoints_thread, distance_matrix_thread, weights_thread, epsilon_thread,weight_method=self.weight_method) + self.kernel=kernel # diagonalize kernel params= p_arpack._ParallelSymmetricArpackParams(comm, kernel, self.neigs) while not params.converged: @@ -414,7 +485,7 @@ def run(self): # store nearest neighbors in .nn file if specified via -n option if args.nnfile is not None: logging.info("Saving nearest neighbors") - self.save_nneighbors(comm, args, neighbor_matrix, idx_neighbor_matrix, epsilon_thread) + self.save_nneighbors(comm, args, neighbor_matrix_thread, idx_neighbor_matrix_thread, epsilon_thread) if (args.dmfile is not None) and (args.dminput is None): logging.info("Saving distance matrix") diff --git a/lsdmap/rw/x2h.py b/lsdmap/rw/x2h.py new file mode 100644 index 0000000..73c58e0 --- /dev/null +++ b/lsdmap/rw/x2h.py @@ -0,0 +1,292 @@ +import numpy as np +import mdtraj as mdt +import tempfile +import os +import h5py +import dask.bag as db +import dask.array as da +from MDPlus.core import fastfitting +CHUNKS = 10000 + +def pib(coords, box): + ''' + Pack coordinates into periodic box + ''' + + assert len(coords.shape) == 2 + assert coords.shape[1] == 3 + assert box.shape == (3, 3) + + boxinv = np.zeros((3)) + boxinv[0] = 1.0 / box[0,0] + boxinv[1] = 1.0 / box[1,1] + boxinv[2] = 1.0 / box[2,2] + + for xyz in coords: + s = np.floor(xyz[2] * boxinv[2]) + xyz[2] -= s * box[2,2] + xyz[1] -= s * box[2,1] + xyz[0] -= s * box[2,0] + + s = np.floor(xyz[1] * boxinv[1]) + xyz[1] -= s * box[1,1] + xyz[0] -= s * box[1,0] + + s = np.floor(xyz[0] * boxinv[0]) + xyz[0] -= s * box[0,0] + + return coords + +class Fasu: + def __init__(self, topology, trajectory, frames=None, selection='all', + centre=None, pack_into_box=False): + ''' + A Fasu defines the required data to be extracted from one or more + trajectory files. + + Arguments are: + topology: + name of a topology file compliant with the trajectory files(s). + trajectory: + list of one or more trajectory files. + frames: + selection of trajectory frames to include. Can be a slice object, + or a numpy array. + selection: + MDTraj-compliant atom selection string. + centre: + If not None, an MDTraj-compliant atom selection string that defines + atoms whose geometric centre will be moved to the centre of the + periodic box (if there is one), or to the origin (if there isn't). + pack_into_box: + if True, all coordinates will be imaged into the primary unit cell, + after any centering has been done. + + ''' + test = open(topology, 'r') + test.close() + + self.topology = topology + self.trajectory = trajectory + if not isinstance(trajectory, list): + self.trajectory = [trajectory,] + + for t in self.trajectory: + test = open(t, 'r') + test.close() + + if frames is not None: + if not (isinstance(frames, slice) or isinstance(frames, np.ndarray)): + raise TypeError('frames must be a slice object or numpy array') + + self.frames = frames + self.selection = selection + self.centre = centre + self.pack_into_box = pack_into_box + + def _process(self, hdfdir=None): + ''' + Private function that processes the Fasu definition, returning the name + of an HDF5-format file that contains the required data. + + Arguments: + hdfdir: + The name of the directory in which the HDF5 format file + will be created. If not given, the OS-defined temporary directory + is used. + ''' + + u = mdt.load(self.topology) + sel = u.top.select(self.selection) + ext = os.path.splitext(self.trajectory[0])[1].lower() + if not ext in ['gro', 'pdb']: + u = mdt.load(self.trajectory, top=self.topology, atom_indices=sel) + else: + u = mdt.load(self.trajectory, atom_indices=sel) + + masses = [atom.element.mass for atom in u.top.atoms] + masses = np.array(masses, dtype='float32') + names = [u.top.atom(i).name for i in range(u.n_atoms)] + + h5filename = tempfile.NamedTemporaryFile(dir=hdfdir).name + + if self.frames is not None: + x = np.array(u.xyz[self.frames], dtype='float32') + else: + x = np.array(u.xyz, dtype='float32') + + if self.centre is not None: + c = u.top.select(self.centre) + for i in range(len(x)): + cx = x[i][c].mean(axis=0) + if u.unitcell_vectors is None: + shift = -cx + else: + shift = u.unitcell_vectors[i].diagonal()/2 - cx + x[i] = x[i] + shift + + if self.pack_into_box: + for i in range(len(x)): + x[i] = pib(x[i], u.unitcell_vectors[i]) + + hf = h5py.File(h5filename, 'w') + hx = hf.create_dataset('x', data=x*10.0) + hm = hf.create_dataset('m', data=masses) + if u.unitcell_vectors is not None: + hb = hf.create_dataset('b', data=u.unitcell_vectors) + dt = h5py.special_dtype(vlen=unicode) + hn = hf.create_dataset('n', data=names, dtype=dt) + + hf.close() + self.top = u.top + return h5filename + +class Cofasu: + ''' + A collection of Fasus. + + A Cofasu is created from a list of one or more Fasus: + c = Cofasu(fasulist) + or alternatively from a list of already-created HDF5-format files: + c = Cofasu(hdf5filelist) + + The concatenated trajectories are then available as if in a numpy array: + nframes, natoms, ndims = c.shape # ndims will always be 3 + frame0 = c[0] + ''' + + def __init__(self, fasulist, check=None, hdfdir=None): + + if not isinstance(fasulist, list): + fasulist = [fasulist,] + + if isinstance(fasulist[0], str): + self.hflist = fasulist + else: + b = db.from_sequence([f._process(hdfdir=hdfdir) for f in fasulist]) + self.hflist = b.compute() + + self.hlist = [h5py.File(h, 'r+') for h in self.hflist] + + if check is "names": + nref = self.hlist[0]['n'] + for i in range(1, len(self.hlist)): + if not (nref[:] == self.hlist[i]['n'][:]).all: + raise ValueError('Fasus with mismatched atom names') + + elif check is "masses": + mref = self.hlist[0]['m'] + for i in range(1, len(self.hlist)): + if not (mref[:] == self.hlist[i]['m'][:]).all: + raise ValueError('Fasus with mismatched atom masses') + + xs = [da.from_array(h['x'], chunks=CHUNKS) for h in self.hlist] + self.x = da.concatenate(xs) + if 'h' in h: + xb = [da.from_array(h['b'], chunks=CHUNKS) for h in self.hlist] + self.box = da.concatenate(xb) + else: + self.box = None + self.fasulist = fasulist + self.masses = self.hlist[0]['m'] + self.shape = self.shape() + self.top = self.fasulist[0].top + + def __len__(self): + return len(self.x) + + def __getitem__(self, key): + return self.x[key].compute() + + def shape(self): + return self.x.shape + + def reset(self): + ''' + Removes any alignment from the trajectories + ''' + xs = [da.from_array(h['x'], chunks=CHUNKS) for h in self.hlist] + self.x = da.concatenate(xs) + + def align(self, target=None, weighted=False, procrustes=False, + error=0.0001, maxcyc=10): + ''' + Aligns the frames in atrajectory to some reference structure, with + optional mass-weighting. + + Arguments: + target: + If given, a reference structure to fir to, as a [N,3] numpy array. + + weighted: + If specified, mass-weighted fitting is done. + + procrustes: + If specified , procrustes iterative fitting is done to convergence. + + error: + Defines the target error for the procrustes fit. + + maxcyc: + Defines the maximum number of iterations for the procrustes method. + ''' + + self.reset() + if target is None: + targ = self.x[0] + else: + targ = da.from_array(target, chunks = CHUNKS) + + if weighted: + weights = self.masses + else: + weights = np.ones_like(self.masses) + weights = da.from_array(np.stack([weights,] * 3).T, chunks=CHUNKS) + + self.x = da.map_blocks(fastfitting.fitted_traj, self.x, targ, weights) + if not procrustes: + return + + avg = self.x.mean(axis=0) + err = avg - targ + err = (err*err).mean().compute() + cycle = 1 + while err > error and cycle < maxcyc: + target = avg + self.reset() + self.x = da.map_blocks(fastfitting.fitted_traj, self.x, target, weights) + avg = self.x.mean(axis=0).compute() + avg = da.from_array(avg, chunks=CHUNKS) + err = avg - target + err = (err*err).mean().compute() + cycle += 1 + print 'Procrustes converged in {} cycles with error {}'.format(cycle, + err) + + def write(self, filename, coordinates=None): + ''' + Writes selected data to an output file, of format specified by the + given filename's extension. + + Arguments: + filename: + Name of the file to be written. All MDTraj-supported formats are + available. + + coordinates: + An [nframes, natoms, 3] numpy array defining what will be written, + else all frames in the Cofasu will be output. + ''' + + # Note: currently ignores box data. + ext = os.path.splitext(filename)[1].lower() + needs_topology = ext in ['.gro', '.pdb'] + + if coordinates is None: + coordinates = self.x.compute() + + with mdt.open(filename, 'w') as f: + if needs_topology: + f.write(coordinates, self.top) + else: + f.write(coordinates) From b799d33d6547404f42eea740f3b3aa7c135f80c5 Mon Sep 17 00:00:00 2001 From: Charlie Laughton Date: Thu, 28 Jan 2016 15:01:34 +0000 Subject: [PATCH 2/6] Update README.md Modifications for ExTASY wrappers-based implementation. --- README.md | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7872040..9ad8f4a 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,15 @@ LSDMap LSDMap package is used to compute Locally Scaled Diffusion Map. Typical usage is to call the "lsdmap" script: - lsdmap -f -c + lsdmap -f -c -t or using MPI: - mpiexec -n lsdmap -f -c + mpiexec -n lsdmap -f -c -t A typical example of configuration file is ./examples/lsdmap/config.ini The structure file should contain all the configurations needed to compute -LSDMap. After execution of the script, a .ev and a .eg file should have +LSDMap (e.g., a multi-model .gro file). After execution of the script, a .ev and a .eg file should have been generated containing the eigenvectors and eigenvalues, respectively. See the paper W. Zheng, M. A. Rohrdanz, M. Maggioni and C. Clementi, J. Chem. Phys., 2011, 134, 144109 for more information on how LSDMap works. @@ -60,7 +60,7 @@ which contains 1000 configurations of alanine dipeptide in vacuum and an example of configuration file (.ini) that should be used to compute LSDMap. To test the program, simply type in this folder: - lsdmap -f config.ini -c aladip_1000.gro + lsdmap -f config.ini -c aladip_1000.gro -t aladip.gro After execution, a file ".ev" and a file ".eg" must have been generated. They contain the eigenvectors and eigenvalues of the Fokker-Planck operator, @@ -73,7 +73,7 @@ and so on. LSDMap can be computed using MPI using a command similar to: - mpiexec -n lsdmap -f -c + mpiexec -n lsdmap -f -c -t For more information on lsdmap command, simply type: @@ -88,15 +88,7 @@ DM-d-MD (Diffusion-Map directed Molecular Dynamics) is an adaptive sampling algorithm based on LSDMap. For an introduction to DM-d-MD, see the paper J.Preto and C. Clementi, Phys. Chem. Chem. Phys., 2014, 16, 19181-19191. -Besides LSDMap, DM-d-MD requires GROMACS to be correctly installed. - -DM-d-MD is automatically installed when installing LSDMap via the command: - - python setup.py install - -A typical usage of DM-d-MD is to call: - - dmdmd -f +DM-d-MD jobs are run through python scripts. For examples, see the examples/dmdmd_ala12 and examples/dmdmd directories. Prerequisites @@ -105,19 +97,22 @@ Prerequisites In order to use DM-d-MD, it is required that GROMACS has been correctly installed and that "grompp" and "mdrun" commands are working properly for a serial utilization. If not, please visit http://www.gromacs.org/. +The ExTASY wrappers python library is also required (https://bitbucket.org/claughton/wrappers) Testing ------- -The Folder examples/dmdmd contains an example of DM-d-MD configuration -file (dmdmd.ini) as well as files required to run GROMACS MD simulations +The Folder examples/dmdmd contains an example of DM-d-MD python script (rundmdmd.py) as well as files required to run GROMACS MD simulations for the photoactive yellow protein (PYP). DM-d-MD can be launched by executing the command: - dmdmd -f dmdmd.ini + python rundmdmd.py within the specified folder. +Note: it may be wise to issue the command: + setenv GMX_MAXBACKUP -1 +first. Diffusion-Map Sampling From 98b79d07a692ff82c6967beb39df428169705095 Mon Sep 17 00:00:00 2001 From: Charlie Laughton Date: Thu, 28 Jan 2016 15:06:08 +0000 Subject: [PATCH 3/6] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9ad8f4a..4c820e3 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ algorithm based on LSDMap. For an introduction to DM-d-MD, see the paper J.Preto and C. Clementi, Phys. Chem. Chem. Phys., 2014, 16, 19181-19191. DM-d-MD jobs are run through python scripts. For examples, see the examples/dmdmd_ala12 and examples/dmdmd directories. +Other examples, using AMBER as the MD engine as opposed to GROMACS, are available in the examples folder that comes with Extasy wrappers (https://bitbucket.org/claughton/wrappers) Prerequisites @@ -111,7 +112,9 @@ executing the command: within the specified folder. Note: it may be wise to issue the command: + setenv GMX_MAXBACKUP -1 + first. From 2adf3dc777a7b67c0998ccf7700890edea923bde Mon Sep 17 00:00:00 2001 From: Charlie Laughton Date: Thu, 28 Jan 2016 15:48:59 +0000 Subject: [PATCH 4/6] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 4c820e3..9e3a320 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,16 @@ packages installed: * cython; version 0.20 or later +If not already available, installing LSDMap will automatically install: + +* MDTraj + +* h5py + +* dask + +* cloudpickle + Version 2.6.x or 2.7.x of python should be used. From bd2bb46a8139a4f273c96a99b63da458f38871c0 Mon Sep 17 00:00:00 2001 From: Charlie Laughton Date: Thu, 28 Jan 2016 16:29:04 +0000 Subject: [PATCH 5/6] Fixes to setup.py --- examples/lsdmap/README | 7 +++++++ lsdmap/rw/x2h.py | 3 ++- setup.py | 16 ++++++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 examples/lsdmap/README diff --git a/examples/lsdmap/README b/examples/lsdmap/README new file mode 100644 index 0000000..3a0fb03 --- /dev/null +++ b/examples/lsdmap/README @@ -0,0 +1,7 @@ +To run this example, type: + +lsdmap -f config.ini -c aladip_1000.gro -t aladip.gro + +Or if you have MPI, something like: + +mpirun -n 4 lsdmap -f config.ini -c aladip_1000.gro -t aladip.gro diff --git a/lsdmap/rw/x2h.py b/lsdmap/rw/x2h.py index 73c58e0..daac8be 100644 --- a/lsdmap/rw/x2h.py +++ b/lsdmap/rw/x2h.py @@ -1,3 +1,4 @@ +# x2h: stripped-down version of the MDPlus Cofasu library. import numpy as np import mdtraj as mdt import tempfile @@ -99,7 +100,7 @@ def _process(self, hdfdir=None): u = mdt.load(self.topology) sel = u.top.select(self.selection) ext = os.path.splitext(self.trajectory[0])[1].lower() - if not ext in ['gro', 'pdb']: + if not ext in ['.gro', '.pdb']: u = mdt.load(self.trajectory, top=self.topology, atom_indices=sel) else: u = mdt.load(self.trajectory, atom_indices=sel) diff --git a/setup.py b/setup.py index 4600374..4d27e09 100755 --- a/setup.py +++ b/setup.py @@ -44,6 +44,14 @@ def check_import(pkgname, pkgver): "You need %(pkgname)s %(pkgver)s or greater to run lsdmap!" % {'pkgname': pkgname, 'pkgver': pkgver} ) else: + try: + ver = mod.__version__ + + except AttributeError: + mod.__version__ = mod.version.version + + if 'b' in mod.__version__: + mod.__version__ = mod.__version__[:mod.__version__.index('b')] if len(mod.__version__)>6: mod_ver = mod.__version__[:6] else: @@ -68,6 +76,10 @@ def normalize(v): check_import('scipy', min_scipy_version) check_import('mpi4py', min_mpi4py_version) check_import('cython', min_cython_version) +check_import('mdtraj', '0.11') +check_import('h5py', '2.4') +check_import('dask', '0.7.6') +check_import('cloudpickle', '0.1.1') import numpy as np try: @@ -92,10 +104,10 @@ def normalize(v): setup(name='lsdmap', packages=['lsdmap', 'lsdmap.mpi', 'lsdmap.rw', 'lsdmap.util', 'lsdmap.rbf', 'dmdmd', 'dmdmd.tools'], - scripts = ['bin/lsdmap','bin/dmdmd', 'bin/rbffit','bin/reweighting','bin/selection','bin/p_mdrun'], + scripts = ['bin/lsdmap', 'bin/rbffit','bin/reweighting','bin/selection','bin/p_mdrun'], ext_modules = cythonize(ext_modules), cmdclass = cmdclass, license='LICENSE.txt', description='LSDMap package', - long_description=open('README.md').read(), + long_description=open('README.md').read() ) From 1f10178a314212c683d592431c8b7127f0ada685 Mon Sep 17 00:00:00 2001 From: Charlie Laughton Date: Wed, 3 Feb 2016 12:12:34 +0000 Subject: [PATCH 6/6] Removed dependency on MDPlus from x2h.py --- lsdmap/rw/x2h.py | 63 ------------------------------------------------ 1 file changed, 63 deletions(-) diff --git a/lsdmap/rw/x2h.py b/lsdmap/rw/x2h.py index daac8be..d162fd4 100644 --- a/lsdmap/rw/x2h.py +++ b/lsdmap/rw/x2h.py @@ -6,7 +6,6 @@ import h5py import dask.bag as db import dask.array as da -from MDPlus.core import fastfitting CHUNKS = 10000 def pib(coords, box): @@ -202,68 +201,6 @@ def __getitem__(self, key): def shape(self): return self.x.shape - def reset(self): - ''' - Removes any alignment from the trajectories - ''' - xs = [da.from_array(h['x'], chunks=CHUNKS) for h in self.hlist] - self.x = da.concatenate(xs) - - def align(self, target=None, weighted=False, procrustes=False, - error=0.0001, maxcyc=10): - ''' - Aligns the frames in atrajectory to some reference structure, with - optional mass-weighting. - - Arguments: - target: - If given, a reference structure to fir to, as a [N,3] numpy array. - - weighted: - If specified, mass-weighted fitting is done. - - procrustes: - If specified , procrustes iterative fitting is done to convergence. - - error: - Defines the target error for the procrustes fit. - - maxcyc: - Defines the maximum number of iterations for the procrustes method. - ''' - - self.reset() - if target is None: - targ = self.x[0] - else: - targ = da.from_array(target, chunks = CHUNKS) - - if weighted: - weights = self.masses - else: - weights = np.ones_like(self.masses) - weights = da.from_array(np.stack([weights,] * 3).T, chunks=CHUNKS) - - self.x = da.map_blocks(fastfitting.fitted_traj, self.x, targ, weights) - if not procrustes: - return - - avg = self.x.mean(axis=0) - err = avg - targ - err = (err*err).mean().compute() - cycle = 1 - while err > error and cycle < maxcyc: - target = avg - self.reset() - self.x = da.map_blocks(fastfitting.fitted_traj, self.x, target, weights) - avg = self.x.mean(axis=0).compute() - avg = da.from_array(avg, chunks=CHUNKS) - err = avg - target - err = (err*err).mean().compute() - cycle += 1 - print 'Procrustes converged in {} cycles with error {}'.format(cycle, - err) - def write(self, filename, coordinates=None): ''' Writes selected data to an output file, of format specified by the