Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: There are no atoms in your system. Suggestions: #95

Open
Yong-Q opened this issue Nov 9, 2023 · 3 comments
Open

Error: There are no atoms in your system. Suggestions: #95

Yong-Q opened this issue Nov 9, 2023 · 3 comments

Comments

@Yong-Q
Copy link

Yong-Q commented Nov 9, 2023

Hello, I followed the tutorial, but made a mistake like this
Command:moltemplate.sh polymer.lt
Please help me if you have time. Thank you!

polymer.lt
:import "E.lt"

write_once("Data Boundary") {
0.0 30 xlo xhi
0.0 30 ylo yhi
0.0 30 zlo zhi
}
Polymer inherits E{
E1= new E [1]
E2=new E [2].rot(120,-0.664,1.155,0).move(1.2,-2.21,0)

write("Data Bonds") {
$bond:5 @bond:B1 $atom:E1/C02 $atom:E2/C01
}
}

E.lt:
E{

write("Data Atoms") {
$atom:C01 $mol:E @atom:c1 0.109600 5.983000 -1.155000 0.000000
$atom:C02 $mol:E @atom:c2 -0.058600 5.319000 0.000000 0.000000
$atom:H03 $mol:E @atom:ha 0.306800 6.672000 -1.155000 -0.908000
$atom:H04 $mol:E @atom:ha 0.315400 4.352000 -0.117000 0.593000
$atom:H05 $mol:E @atom:ha 0.326800 5.072000 0.297000 -1.073000
}

write_once("Data Masses") {
@atom:c1 12.0100
@atom:c2 12.0100
@atom:ha 1.0080
}

write("Data Bonds") {
$bond:1 @bond:B1 $atom:C01 $atom:C02
$bond:2 @bond:B2 $atom:C01 $atom:H03
$bond:3 @bond:B3 $atom:C02 $atom:H04
$bond:4 @bond:B3 $atom:C02 $atom:H05
}

write("Data Angles") {
$angle:1 @Angle:A1 $atom:C02 $atom:C01 $atom:H03
$angle:2 @Angle:A2 $atom:C01 $atom:C02 $atom:H04
$angle:3 @Angle:A2 $atom:C01 $atom:C02 $atom:H05
$angle:4 @Angle:A3 $atom:H04 $atom:C02 $atom:H05
}

write("Data Dihedrals") {
$dihedral:1 @dihedral:D1 $atom:H04 $atom:C02 $atom:C01 $atom:H03
$dihedral:2 @dihedral:D1 $atom:H05 $atom:C02 $atom:C01 $atom:H03
}
... ...

@hu-fu1
Copy link

hu-fu1 commented Dec 20, 2023

You did not import oplassaa force field file in E.lt file

@hothello
Copy link
Contributor

You defined your monomer correctly, but it is an error to use the import E statement, as this is only used for LT files containing force field parameters. The error you reported appears because you defined a polymer, but actually never create any instance of it. The revised files are:
E.lt

write_once("Data Masses") {
@atom:c1 12.0100
@atom:c2 12.0100
@atom:ha 1.0080
}

E{

write("Data Atoms") {
$atom:C01 $mol @atom:c1  0.109600 5.983000 -1.155000 0.000000
$atom:C02 $mol @atom:c2 -0.058600 5.319000 0.000000 0.000000
$atom:H03 $mol @atom:ha  0.306800 6.672000 -1.155000 -0.908000
$atom:H04 $mol @atom:ha  0.315400 4.352000 -0.117000 0.593000
$atom:H05 $mol @atom:ha  0.326800 5.072000 0.297000 -1.073000
}

write("Data Bonds") {
$bond:1 @bond:B1 $atom:C01 $atom:C02
$bond:2 @bond:B2 $atom:C01 $atom:H03
$bond:3 @bond:B3 $atom:C02 $atom:H04
$bond:4 @bond:B3 $atom:C02 $atom:H05
}

write("Data Angles") {
$angle:1 @angle:A1 $atom:C02 $atom:C01 $atom:H03
$angle:2 @angle:A2 $atom:C01 $atom:C02 $atom:H04
$angle:3 @angle:A2 $atom:C01 $atom:C02 $atom:H05
$angle:4 @angle:A3 $atom:H04 $atom:C02 $atom:H05
}

write("Data Dihedrals") {
$dihedral:1 @dihedral:D1 $atom:H04 $atom:C02 $atom:C01 $atom:H03
$dihedral:2 @dihedral:D1 $atom:H05 $atom:C02 $atom:C01 $atom:H03
}

}

And polymer.lt

import "E.lt"

write_once("Data Boundary") {
0.0 30 xlo xhi
0.0 30 ylo yhi
0.0 30 zlo zhi
}

Polymer {
 E1 = new E
 E2 = new E.rot(120,-0.664,1.155,0).move(1.2,-2.21,0)

 write("Data Bonds") {
  $bond:5 @bond:B1 $atom:E1/C02 $atom:E2/C01
 }
}

mol = new Polymer

I have compiled with: moltemplate.sh -nocheck polymer.lt as the terms coefficients are not defined. I hope this helps.

@hothello
Copy link
Contributor

PS the -nocheck option is necessary because a bond is defined, but the bond_coeff @bond:B1 is not.

More generally, the force field for the polymer should also include at least the angle and dihedral terms involving the extra $bond:5 term. I assume that yours is a toy model to learn the syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants