-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 'findType' function to Forcefield variable. Added 'epsrmol' exp…
…ort filter. Fixed - 'atomTypes' array accessor in Forcefield variable would only ever return the first element of the array, even if an array index was specified. Updated manual
- Loading branch information
trisyoungs
committed
Dec 3, 2013
1 parent
b579479
commit 0d8d9ca
Showing
10 changed files
with
141 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
AC_PREREQ(2.60) | ||
|
||
# Set program name, version, bug-address and source directory | ||
m4_define([ATEN_VERSION],[1.853]) | ||
m4_define([ATEN_VERSION],[1.854]) | ||
AC_INIT(aten,ATEN_VERSION,[email protected]) | ||
AC_CONFIG_SRCDIR([src/main.cpp]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# EPSR '.mol' file export | ||
# Created: 02/12/2013 | ||
# Last modified: 02/12/2013 | ||
# ChangeLog: | ||
# 02/12/2013 - Initial version | ||
|
||
filter(type="exportmodel",name="EPSR Molfile", extension="mol", glob="*.mol", nickname="epsrmol") | ||
{ | ||
# Variable declaration | ||
pattern p; | ||
int nvdw, n, nc, n2, nconstraints; | ||
model m = aten.model; | ||
|
||
# Main dialog creation function | ||
void createDefaultDialog(Dialog ui) | ||
{ | ||
Widget w; | ||
ui.title = "EPSR Mol File Export Options"; | ||
ui.verticalFill = TRUE; | ||
|
||
ui.addDoubleSpin("temperature", "Temperature", 0.0, 100000.0, 10.0, 300.0); | ||
ui.addDoubleSpin("epsr_vtemp", "Vibrational Temperature", 0.0, 1500.0, 10.0, 65.0); | ||
ui.addDoubleSpin("epsr_density", "Density (atoms/ang3)", 0.0, 10.0, 0.01, 0.1); | ||
ui.addDoubleSpin("epsr_ecore", "Energy for core repulsion terms", 0.0, 10.0, 0.1, 1.0); | ||
ui.addDoubleSpin("epsr_dcore", "Distance for core repulsion terms", 0.0, 10.0, 0.1, 1.0); | ||
} | ||
if (!showDefaultDialog()) error("Canceled through dialog.\n"); | ||
Dialog ui = defaultDialog(); | ||
|
||
# Create a temporary forcefield to store our terms in | ||
Forcefield dummyFF = newFF("Dummy FF"); | ||
|
||
# Write distinguishing header line - we will use no atom ID offset | ||
writeLineF(" .gmol 0\n"); | ||
|
||
# Write atom coordinates and bonds | ||
for (Atom i = m.atoms; i; ++i) | ||
{ | ||
writeLineF(" atom %i %s %f %f %f %i", i.id, i.type.name, i.rx, i.ry, i.rz, i.nBonds); | ||
if (!dummyFF.findType(i.type.name)) | ||
{ | ||
int id = dummyFF.nAtomTypes+1; | ||
FFAtom x = dummyFF.addType(id, i.type.name, i.type.name, i.z, "", ""); | ||
dummyFF.addInter("lj", id, i.type.charge, i.type.data[1], i.type.data[2]); | ||
} | ||
for (Bond b = i.bonds; b; ++b) writeLineF(" %i", b.partner(i).id); | ||
writeLineF("\n"); | ||
} | ||
|
||
# Loop over bonds and angles in the system, creating a 'dummy' forcefield for them | ||
for (Bond b = m.bonds; b; ++b) | ||
{ | ||
if (dummyFF.findBond(b.i.type.name, b.j.type.name)) continue; | ||
dummyFF.addBond("harmonic", b.i.type.name, b.j.type.name, 0.0, geometry(b.i, b.j)); | ||
writeLineF("bond %s %s %f\n", b.i.type.name, b.j.type.name, geometry(b.i, b.j)); | ||
} | ||
for (Atom j = m.atoms; j; ++j) | ||
{ | ||
for (Bond b1 = j.bonds; b1; ++b1) | ||
{ | ||
for (Bond b2 = b1; b2; ++b2) | ||
{ | ||
if (b1 == b2) continue; | ||
Atom i = b1.partner(j); | ||
Atom k = b2.partner(j); | ||
if (dummyFF.findAngle(i.type.name, j.type.name, k.type.name)) continue; | ||
dummyFF.addAngle("harmonic", i.type.name, j.type.name, k.type.name, 0.0, geometry(i, j, k)); | ||
writeLineF("angle %s %s %s %f\n", i.type.name, j.type.name, k.type.name, geometry(i, j, k)); | ||
} | ||
} | ||
} | ||
|
||
# Write dihedral information | ||
for (Bond b = m.bonds; b; ++b) | ||
{ | ||
# Loop over other bonds at first terminus, excluding the central one 'b' | ||
for (Bond bi = b.i.bonds; bi; ++bi) | ||
{ | ||
if (bi == b) continue; | ||
|
||
# Loop over other bonds at second terminus, excluding the central one 'b' | ||
for (Bond bj = b.j.bonds; bj; ++bj) | ||
{ | ||
if (bj == b) continue; | ||
Atom i = bi.partner(b.i); | ||
Atom j = b.i; | ||
Atom k = b.j; | ||
Atom l = bj.partner(b.j); | ||
writeLineF("dihedral %3i %3i %3i %3i %f\n", i.id, j.id, k.id, l.id, geometry(i,j,k,l) ); | ||
} | ||
} | ||
} | ||
|
||
# Write rotational headgroup specifications | ||
for (Bond b = m.bonds; b; ++b) | ||
{ | ||
if (b.i.fixed && b.j.fixed) continue; | ||
if (b.i.nBonds == 1) continue; | ||
if (b.j.nBonds == 1) continue; | ||
writeLineF("rot %i %i\n", b.i.id, b.j.id); | ||
} | ||
|
||
# Potential parameters | ||
for (n=2; n<=dummyFF.nAtomTypes; ++n) | ||
{ | ||
FFAtom at = dummyFF.atomTypes[n]; | ||
writeLineF("potential %s %f %f %f %f %s\n", at.name, at.data[1], at.data[2], aten.elements[at.z].mass, at.charge, aten.elements[at.z].symbol); | ||
} | ||
|
||
# Other variables | ||
writeLineF("temperature %f\n", ui.asDouble("temperature")); | ||
writeLineF("vibtemp %f\n", ui.asDouble("epsr_vtemp")); | ||
writeLineF("density %f\n", ui.asDouble("epsr_density")); | ||
writeLineF("ecoredcore %f %f\n", ui.asDouble("epsr_ecore"), ui.asDouble("epsr_dcore")); | ||
|
||
# Remove our temporary forcefield | ||
deleteFF(dummyFF); | ||
} | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
Format: 1.0 | ||
Source: aten | ||
Version: 1.853 | ||
Version: 1.854 | ||
Binary: aten | ||
Maintainer: Tristan Youngs <[email protected]> | ||
Architecture: any | ||
Build-Depends: debhelper (>= 4.1.16), libqt4-dev | libqt4-core, libqt4-opengl-dev, libreadline5-dev | libreadline-dev, libgl1-mesa-dev, pkgconfig | pkg-config, libncurses5 | ||
Files: | ||
c9261a9523963a7d298046de12c9b803 4307358 aten-1.853.tar.gz | ||
c9261a9523963a7d298046de12c9b803 4307358 aten-1.854.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters